├── .editorconfig ├── .github ├── release.yml ├── renovate.json5 ├── super-linter.env └── workflows │ ├── acceptance-tests.yml │ ├── build.yml │ ├── github-pages.yaml │ ├── lint-rest.yml │ ├── native-tests.yml │ ├── release.yml │ ├── super-linter.yml │ └── test-release-build.yml ├── .gitignore ├── .gitleaksignore ├── .mvn ├── jvm.config └── wrapper │ └── maven-wrapper.properties ├── .yaml-lint.yml ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── MAINTAINERS.md ├── NOTICE ├── README.md ├── RELEASING.md ├── SECURITY.md ├── benchmarks ├── README.md ├── pom.xml ├── src │ ├── archive │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── client │ │ │ ├── CKMSQuantileBenchmark.java │ │ │ └── benchmark │ │ │ ├── CounterBenchmark.java │ │ │ ├── ExemplarsBenchmark.java │ │ │ ├── GaugeBenchmark.java │ │ │ ├── SanitizeMetricNameBenchmark.java │ │ │ └── SummaryBenchmark.java │ └── main │ │ └── java │ │ └── io │ │ └── prometheus │ │ └── metrics │ │ └── benchmarks │ │ ├── BenchmarkRunner.java │ │ ├── CounterBenchmark.java │ │ ├── HistogramBenchmark.java │ │ ├── RandomNumbers.java │ │ └── TextFormatUtilBenchmark.java └── version-rules.xml ├── checkstyle-suppressions.xml ├── checkstyle.xml ├── docs ├── .gitignore ├── README.md ├── archetypes │ └── default.md ├── content │ ├── _index.md │ ├── config │ │ ├── _index.md │ │ └── config.md │ ├── exporters │ │ ├── _index.md │ │ ├── filter.md │ │ ├── formats.md │ │ ├── httpserver.md │ │ ├── pushgateway.md │ │ ├── servlet.md │ │ └── spring.md │ ├── getting-started │ │ ├── _index.md │ │ ├── callbacks.md │ │ ├── labels.md │ │ ├── metric-types.md │ │ ├── multi-target.md │ │ ├── performance.md │ │ ├── quickstart.md │ │ └── registry.md │ ├── instrumentation │ │ ├── _index.md │ │ ├── caffeine.md │ │ ├── guava.md │ │ └── jvm.md │ ├── internals │ │ ├── _index.md │ │ └── model.md │ ├── migration │ │ ├── _index.md │ │ └── simpleclient.md │ └── otel │ │ ├── _index.md │ │ ├── names.md │ │ ├── otlp.md │ │ └── tracing.md ├── data │ └── menu │ │ ├── extra.yaml │ │ └── more.yaml ├── hugo.toml ├── static │ ├── .gitignore │ ├── brand.svg │ ├── custom.css │ ├── favicon │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon.ico │ │ └── favicon.svg │ └── images │ │ ├── model.png │ │ └── otel-pipeline.png └── themes │ └── hugo-geekdoc │ ├── LICENSE │ ├── README.md │ ├── VERSION │ ├── archetypes │ ├── docs.md │ └── posts.md │ ├── assets │ ├── search │ │ ├── config.json │ │ └── data.json │ └── sprites │ │ └── geekdoc.svg │ ├── data │ └── assets.json │ ├── i18n │ ├── cs.yaml │ ├── de.yaml │ ├── en.yaml │ ├── es.yaml │ ├── it.yaml │ ├── ja.yaml │ ├── nl.yaml │ └── zh-cn.yaml │ ├── images │ ├── readme.png │ ├── screenshot.png │ └── tn.png │ ├── layouts │ ├── 404.html │ ├── _default │ │ ├── _markup │ │ │ ├── render-codeblock-mermaid.html │ │ │ ├── render-heading.html │ │ │ ├── render-image.html │ │ │ └── render-link.html │ │ ├── baseof.html │ │ ├── list.html │ │ ├── single.html │ │ ├── taxonomy.html │ │ └── terms.html │ ├── partials │ │ ├── foot.html │ │ ├── head │ │ │ ├── custom.html │ │ │ ├── favicons.html │ │ │ ├── meta.html │ │ │ ├── microformats.html │ │ │ ├── others.html │ │ │ └── rel-me.html │ │ ├── language.html │ │ ├── menu-bundle.html │ │ ├── menu-extra.html │ │ ├── menu-filetree.html │ │ ├── menu-nextprev.html │ │ ├── menu.html │ │ ├── microformats │ │ │ ├── opengraph.html │ │ │ ├── schema.html │ │ │ └── twitter_cards.html │ │ ├── page-header.html │ │ ├── pagination.html │ │ ├── posts │ │ │ └── metadata.html │ │ ├── search.html │ │ ├── site-footer.html │ │ ├── site-header.html │ │ ├── svg-icon-symbols.html │ │ └── utils │ │ │ ├── content.html │ │ │ ├── description.html │ │ │ ├── featured.html │ │ │ └── title.html │ ├── posts │ │ ├── list.html │ │ └── single.html │ ├── robots.txt │ └── shortcodes │ │ ├── button.html │ │ ├── columns.html │ │ ├── expand.html │ │ ├── hint.html │ │ ├── icon.html │ │ ├── img.html │ │ ├── include.html │ │ ├── katex.html │ │ ├── mermaid.html │ │ ├── progress.html │ │ ├── propertylist.html │ │ ├── tab.html │ │ ├── tabs.html │ │ ├── toc-tree.html │ │ └── toc.html │ ├── static │ ├── brand.svg │ ├── custom.css │ ├── favicon │ │ ├── android-chrome-144x144.png │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-256x256.png │ │ ├── android-chrome-36x36.png │ │ ├── android-chrome-384x384.png │ │ ├── android-chrome-48x48.png │ │ ├── android-chrome-512x512.png │ │ ├── android-chrome-72x72.png │ │ ├── android-chrome-96x96.png │ │ ├── apple-touch-icon-1024x1024.png │ │ ├── apple-touch-icon-114x114.png │ │ ├── apple-touch-icon-120x120.png │ │ ├── apple-touch-icon-144x144.png │ │ ├── apple-touch-icon-152x152.png │ │ ├── apple-touch-icon-167x167.png │ │ ├── apple-touch-icon-180x180.png │ │ ├── apple-touch-icon-57x57.png │ │ ├── apple-touch-icon-60x60.png │ │ ├── apple-touch-icon-72x72.png │ │ ├── apple-touch-icon-76x76.png │ │ ├── apple-touch-icon-precomposed.png │ │ ├── apple-touch-icon.png │ │ ├── apple-touch-startup-image-1125x2436.png │ │ ├── apple-touch-startup-image-1136x640.png │ │ ├── apple-touch-startup-image-1170x2532.png │ │ ├── apple-touch-startup-image-1242x2208.png │ │ ├── apple-touch-startup-image-1242x2688.png │ │ ├── apple-touch-startup-image-1284x2778.png │ │ ├── apple-touch-startup-image-1334x750.png │ │ ├── apple-touch-startup-image-1536x2048.png │ │ ├── apple-touch-startup-image-1620x2160.png │ │ ├── apple-touch-startup-image-1668x2224.png │ │ ├── apple-touch-startup-image-1668x2388.png │ │ ├── apple-touch-startup-image-1792x828.png │ │ ├── apple-touch-startup-image-2048x1536.png │ │ ├── apple-touch-startup-image-2048x2732.png │ │ ├── apple-touch-startup-image-2160x1620.png │ │ ├── apple-touch-startup-image-2208x1242.png │ │ ├── apple-touch-startup-image-2224x1668.png │ │ ├── apple-touch-startup-image-2388x1668.png │ │ ├── apple-touch-startup-image-2436x1125.png │ │ ├── apple-touch-startup-image-2532x1170.png │ │ ├── apple-touch-startup-image-2688x1242.png │ │ ├── apple-touch-startup-image-2732x2048.png │ │ ├── apple-touch-startup-image-2778x1284.png │ │ ├── apple-touch-startup-image-640x1136.png │ │ ├── apple-touch-startup-image-750x1334.png │ │ ├── apple-touch-startup-image-828x1792.png │ │ ├── browserconfig.xml │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon-48x48.png │ │ ├── favicon.ico │ │ ├── favicon.svg │ │ ├── manifest.json │ │ ├── mstile-144x144.png │ │ ├── mstile-150x150.png │ │ ├── mstile-310x150.png │ │ ├── mstile-310x310.png │ │ └── mstile-70x70.png │ ├── fonts │ │ ├── GeekdocIcons.woff │ │ ├── GeekdocIcons.woff2 │ │ ├── KaTeX_AMS-Regular.woff │ │ ├── KaTeX_AMS-Regular.woff2 │ │ ├── KaTeX_Caligraphic-Bold.woff │ │ ├── KaTeX_Caligraphic-Bold.woff2 │ │ ├── KaTeX_Caligraphic-Regular.woff │ │ ├── KaTeX_Caligraphic-Regular.woff2 │ │ ├── KaTeX_Fraktur-Bold.woff │ │ ├── KaTeX_Fraktur-Bold.woff2 │ │ ├── KaTeX_Fraktur-Regular.woff │ │ ├── KaTeX_Fraktur-Regular.woff2 │ │ ├── KaTeX_Main-Bold.woff │ │ ├── KaTeX_Main-Bold.woff2 │ │ ├── KaTeX_Main-BoldItalic.woff │ │ ├── KaTeX_Main-BoldItalic.woff2 │ │ ├── KaTeX_Main-Italic.woff │ │ ├── KaTeX_Main-Italic.woff2 │ │ ├── KaTeX_Main-Regular.woff │ │ ├── KaTeX_Main-Regular.woff2 │ │ ├── KaTeX_Math-BoldItalic.woff │ │ ├── KaTeX_Math-BoldItalic.woff2 │ │ ├── KaTeX_Math-Italic.woff │ │ ├── KaTeX_Math-Italic.woff2 │ │ ├── KaTeX_SansSerif-Bold.woff │ │ ├── KaTeX_SansSerif-Bold.woff2 │ │ ├── KaTeX_SansSerif-Italic.woff │ │ ├── KaTeX_SansSerif-Italic.woff2 │ │ ├── KaTeX_SansSerif-Regular.woff │ │ ├── KaTeX_SansSerif-Regular.woff2 │ │ ├── KaTeX_Script-Regular.woff │ │ ├── KaTeX_Script-Regular.woff2 │ │ ├── KaTeX_Size1-Regular.woff │ │ ├── KaTeX_Size1-Regular.woff2 │ │ ├── KaTeX_Size2-Regular.woff │ │ ├── KaTeX_Size2-Regular.woff2 │ │ ├── KaTeX_Size3-Regular.woff │ │ ├── KaTeX_Size3-Regular.woff2 │ │ ├── KaTeX_Size4-Regular.woff │ │ ├── KaTeX_Size4-Regular.woff2 │ │ ├── KaTeX_Typewriter-Regular.woff │ │ ├── KaTeX_Typewriter-Regular.woff2 │ │ ├── LiberationMono.woff │ │ ├── LiberationMono.woff2 │ │ ├── LiberationSans-Bold.woff │ │ ├── LiberationSans-Bold.woff2 │ │ ├── LiberationSans-BoldItalic.woff │ │ ├── LiberationSans-BoldItalic.woff2 │ │ ├── LiberationSans-Italic.woff │ │ ├── LiberationSans-Italic.woff2 │ │ ├── LiberationSans.woff │ │ ├── LiberationSans.woff2 │ │ ├── Metropolis.woff │ │ └── Metropolis.woff2 │ ├── img │ │ └── geekdoc-stack.svg │ ├── js │ │ ├── 116-341f79d9.chunk.min.js │ │ ├── 118-f1de6a20.chunk.min.js │ │ ├── 19-86f47ecd.chunk.min.js │ │ ├── 361-f7cd601a.chunk.min.js │ │ ├── 423-897d7f17.chunk.min.js │ │ ├── 430-cc171d93.chunk.min.js │ │ ├── 433-f2655a46.chunk.min.js │ │ ├── 438-760c9ed3.chunk.min.js │ │ ├── 476-86e5cf96.chunk.min.js │ │ ├── 506-6950d52c.chunk.min.js │ │ ├── 519-8d0cec7f.chunk.min.js │ │ ├── 535-dcead599.chunk.min.js │ │ ├── 545-8e970b03.chunk.min.js │ │ ├── 546-560b35c2.chunk.min.js │ │ ├── 579-9222afff.chunk.min.js │ │ ├── 626-1706197a.chunk.min.js │ │ ├── 637-86fbbecd.chunk.min.js │ │ ├── 637-86fbbecd.chunk.min.js.LICENSE.txt │ │ ├── 639-88c6538a.chunk.min.js │ │ ├── 642-12e7dea2.chunk.min.js │ │ ├── 662-17acb8f4.chunk.min.js │ │ ├── 662-17acb8f4.chunk.min.js.LICENSE.txt │ │ ├── 728-5df4a5e5.chunk.min.js │ │ ├── 729-32b017b3.chunk.min.js │ │ ├── 747-b55f0f97.chunk.min.js │ │ ├── 76-732e78f1.chunk.min.js │ │ ├── 771-942a62df.chunk.min.js │ │ ├── 773-8f0c4fb8.chunk.min.js │ │ ├── 81-4e653aac.chunk.min.js │ │ ├── 813-0d3c16f5.chunk.min.js │ │ ├── 940-25dfc794.chunk.min.js │ │ ├── colortheme-d3e4d351.bundle.min.js │ │ ├── katex-d4d5881d.bundle.min.js │ │ ├── main-924a1933.bundle.min.js │ │ ├── main-924a1933.bundle.min.js.LICENSE.txt │ │ ├── mermaid-d305d450.bundle.min.js │ │ ├── search-9719be99.bundle.min.js │ │ └── search-9719be99.bundle.min.js.LICENSE.txt │ ├── katex-66092164.min.css │ ├── main-252d384c.min.css │ ├── mobile-79ddc617.min.css │ └── print-735ccc12.min.css │ └── theme.toml ├── examples ├── example-exemplars-tail-sampling │ ├── README.md │ ├── config │ │ ├── grafana-dashboards.yaml │ │ ├── grafana-datasources.yaml │ │ ├── grafana-example-dashboard.json │ │ ├── k6-script.js │ │ ├── otelcol-config.yaml │ │ ├── prometheus.yaml │ │ └── tempo-config.yaml │ ├── docker-compose.yaml │ ├── example-greeting-service │ │ ├── pom.xml │ │ ├── src │ │ │ └── main │ │ │ │ └── java │ │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── metrics │ │ │ │ └── examples │ │ │ │ └── otel │ │ │ │ └── exemplars │ │ │ │ └── greeting │ │ │ │ ├── GreetingServlet.java │ │ │ │ └── Main.java │ │ └── version-rules.xml │ ├── example-hello-world-app │ │ ├── pom.xml │ │ ├── src │ │ │ └── main │ │ │ │ └── java │ │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── metrics │ │ │ │ └── examples │ │ │ │ └── otel │ │ │ │ └── exemplars │ │ │ │ └── app │ │ │ │ ├── HelloWorldServlet.java │ │ │ │ └── Main.java │ │ └── version-rules.xml │ └── pom.xml ├── example-exporter-httpserver │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── io │ │ └── prometheus │ │ └── metrics │ │ └── examples │ │ └── httpserver │ │ └── Main.java ├── example-exporter-multi-target │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── io │ │ └── prometheus │ │ └── metrics │ │ └── examples │ │ └── multitarget │ │ ├── Main.java │ │ └── SampleMultiCollector.java ├── example-exporter-opentelemetry │ ├── README.md │ ├── config │ │ ├── otelcol-config.yaml │ │ └── prometheus.yaml │ ├── docker-compose.yaml │ ├── oats-tests │ │ ├── agent │ │ │ ├── Dockerfile │ │ │ ├── docker-compose.yml │ │ │ ├── example_target_info.json │ │ │ ├── oats.yaml │ │ │ └── service_instance_id_check.py │ │ └── http │ │ │ ├── Dockerfile │ │ │ ├── docker-compose.yml │ │ │ └── oats.yaml │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── io │ │ └── prometheus │ │ └── metrics │ │ └── examples │ │ └── opentelemetry │ │ ├── Main.java │ │ └── ManualCompleteMetricsTest.java ├── example-exporter-servlet-tomcat │ ├── README.md │ ├── pom.xml │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── metrics │ │ │ └── examples │ │ │ └── tomcat_servlet │ │ │ ├── HelloWorldServlet.java │ │ │ └── Main.java │ └── version-rules.xml ├── example-native-histogram │ ├── README.md │ ├── docker-compose.yaml │ ├── docker-compose │ │ ├── grafana-dashboard-classic-histogram.json │ │ ├── grafana-dashboard-native-histogram.json │ │ ├── grafana-dashboards.yaml │ │ ├── grafana-datasources.yaml │ │ └── prometheus.yml │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── io │ │ └── prometheus │ │ └── metrics │ │ └── examples │ │ └── nativehistogram │ │ └── Main.java ├── example-prometheus-properties │ ├── README.md │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── prometheus │ │ │ └── metrics │ │ │ └── examples │ │ │ └── prometheus_properties │ │ │ └── Main.java │ │ └── resources │ │ └── prometheus.properties ├── example-simpleclient-bridge │ ├── README.md │ ├── pom.xml │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── metrics │ │ │ └── examples │ │ │ └── simpleclient │ │ │ └── Main.java │ └── version-rules.xml └── pom.xml ├── integration-tests ├── it-common │ ├── pom.xml │ ├── src │ │ └── test │ │ │ ├── java │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── client │ │ │ │ └── it │ │ │ │ └── common │ │ │ │ ├── ExporterTest.java │ │ │ │ ├── LogConsumer.java │ │ │ │ └── Volume.java │ │ │ └── resources │ │ │ └── project_version.properties │ └── version-rules.xml ├── it-exporter │ ├── it-exporter-httpserver-sample │ │ ├── pom.xml │ │ ├── src │ │ │ └── main │ │ │ │ └── java │ │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── metrics │ │ │ │ └── it │ │ │ │ └── exporter │ │ │ │ └── httpserver │ │ │ │ └── HTTPServerSample.java │ │ └── version-rules.xml │ ├── it-exporter-no-protobuf │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── metrics │ │ │ └── it │ │ │ └── exporter │ │ │ └── httpserver │ │ │ └── HTTPServerSample.java │ ├── it-exporter-servlet-jetty-sample │ │ ├── pom.xml │ │ ├── src │ │ │ └── main │ │ │ │ └── java │ │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── metrics │ │ │ │ └── it │ │ │ │ └── exporter │ │ │ │ └── servlet │ │ │ │ └── jetty │ │ │ │ └── ExporterServletJettySample.java │ │ └── version-rules.xml │ ├── it-exporter-servlet-tomcat-sample │ │ ├── pom.xml │ │ ├── src │ │ │ └── main │ │ │ │ └── java │ │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── metrics │ │ │ │ └── it │ │ │ │ └── exporter │ │ │ │ └── servlet │ │ │ │ └── tomcat │ │ │ │ └── ExporterServletTomcatSample.java │ │ └── version-rules.xml │ ├── it-exporter-test │ │ ├── pom.xml │ │ ├── src │ │ │ └── test │ │ │ │ ├── java │ │ │ │ └── io │ │ │ │ │ └── prometheus │ │ │ │ │ └── metrics │ │ │ │ │ └── it │ │ │ │ │ └── exporter │ │ │ │ │ └── test │ │ │ │ │ ├── ExporterIT.java │ │ │ │ │ ├── HttpServerIT.java │ │ │ │ │ ├── JettyIT.java │ │ │ │ │ └── TomcatIT.java │ │ │ │ └── resources │ │ │ │ ├── debug-openmetrics.txt │ │ │ │ ├── debug-protobuf.txt │ │ │ │ └── debug-text.txt │ │ └── version-rules.xml │ ├── it-no-protobuf-test │ │ ├── pom.xml │ │ └── src │ │ │ └── test │ │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── metrics │ │ │ └── it │ │ │ └── noprotobuf │ │ │ └── NoProtobufIT.java │ ├── pom.xml │ └── version-rules.xml ├── it-pushgateway │ ├── pom.xml │ ├── src │ │ ├── main │ │ │ └── java │ │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── metrics │ │ │ │ └── it │ │ │ │ └── pushgateway │ │ │ │ └── PushGatewayTestApp.java │ │ └── test │ │ │ ├── java │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── metrics │ │ │ │ └── it │ │ │ │ └── pushgateway │ │ │ │ └── PushGatewayIT.java │ │ │ └── resources │ │ │ ├── prometheus-basicauth.yaml │ │ │ ├── prometheus-ssl.yaml │ │ │ ├── prometheus.yaml │ │ │ ├── pushgateway-basicauth.yaml │ │ │ └── pushgateway-ssl.yaml │ └── version-rules.xml ├── it-spring-boot-smoke-test │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── metrics │ │ │ │ └── it │ │ │ │ └── springboot │ │ │ │ └── Application.java │ │ └── resources │ │ │ └── application.yaml │ │ └── test │ │ └── java │ │ └── io │ │ └── prometheus │ │ └── metrics │ │ └── it │ │ └── springboot │ │ └── ApplicationTest.java ├── pom.xml └── version-rules.xml ├── lychee.toml ├── mise.native.toml ├── mise.toml ├── mvnw ├── mvnw.cmd ├── pom.xml ├── prometheus-metrics-bom ├── pom.xml └── version-rules.xml ├── prometheus-metrics-config ├── pom.xml ├── src │ ├── main │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── metrics │ │ │ └── config │ │ │ ├── ExemplarsProperties.java │ │ │ ├── ExporterFilterProperties.java │ │ │ ├── ExporterHttpServerProperties.java │ │ │ ├── ExporterOpenTelemetryProperties.java │ │ │ ├── ExporterProperties.java │ │ │ ├── ExporterPushgatewayProperties.java │ │ │ ├── MetricsProperties.java │ │ │ ├── PrometheusProperties.java │ │ │ ├── PrometheusPropertiesException.java │ │ │ ├── PrometheusPropertiesLoader.java │ │ │ └── Util.java │ └── test │ │ ├── java │ │ └── io │ │ │ └── prometheus │ │ │ └── metrics │ │ │ └── config │ │ │ ├── ExemplarsPropertiesTest.java │ │ │ ├── ExporterFilterPropertiesTest.java │ │ │ ├── ExporterHttpServerPropertiesTest.java │ │ │ ├── ExporterOpenTelemetryPropertiesTest.java │ │ │ ├── ExporterPropertiesTest.java │ │ │ ├── ExporterPushgatewayPropertiesTest.java │ │ │ ├── MetricsPropertiesTest.java │ │ │ ├── PrometheusPropertiesLoaderTest.java │ │ │ └── PrometheusPropertiesTest.java │ │ └── resources │ │ ├── emptyUpperBounds.properties │ │ └── prometheus.properties └── version-rules.xml ├── prometheus-metrics-core ├── pom.xml ├── src │ ├── main │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── metrics │ │ │ └── core │ │ │ ├── datapoints │ │ │ ├── CounterDataPoint.java │ │ │ ├── DataPoint.java │ │ │ ├── DistributionDataPoint.java │ │ │ ├── GaugeDataPoint.java │ │ │ ├── StateSetDataPoint.java │ │ │ ├── Timer.java │ │ │ └── TimerApi.java │ │ │ ├── exemplars │ │ │ ├── ExemplarSampler.java │ │ │ └── ExemplarSamplerConfig.java │ │ │ ├── metrics │ │ │ ├── Buffer.java │ │ │ ├── CKMSQuantiles.java │ │ │ ├── CallbackMetric.java │ │ │ ├── Counter.java │ │ │ ├── CounterWithCallback.java │ │ │ ├── Gauge.java │ │ │ ├── GaugeWithCallback.java │ │ │ ├── Histogram.java │ │ │ ├── Info.java │ │ │ ├── Metric.java │ │ │ ├── MetricWithFixedMetadata.java │ │ │ ├── SlidingWindow.java │ │ │ ├── StateSet.java │ │ │ ├── StatefulMetric.java │ │ │ ├── Summary.java │ │ │ └── SummaryWithCallback.java │ │ │ └── util │ │ │ └── Scheduler.java │ └── test │ │ └── java │ │ └── io │ │ └── prometheus │ │ └── metrics │ │ └── core │ │ ├── datapoints │ │ ├── CounterDataPointTest.java │ │ └── TimerApiTest.java │ │ ├── exemplars │ │ ├── ExemplarSamplerConfigTestUtil.java │ │ ├── ExemplarSamplerTest.java │ │ └── SpanContextSupplierTest.java │ │ └── metrics │ │ ├── CKMSQuantilesTest.java │ │ ├── CallbackMetricTest.java │ │ ├── CounterTest.java │ │ ├── CounterWithCallbackTest.java │ │ ├── GaugeTest.java │ │ ├── GaugeWithCallbackTest.java │ │ ├── HistogramTest.java │ │ ├── InfoTest.java │ │ ├── SlidingWindowTest.java │ │ ├── StateSetTest.java │ │ ├── StatefulMetricTest.java │ │ ├── SummaryTest.java │ │ ├── SummaryWithCallbackTest.java │ │ ├── TestUtil.java │ │ └── TodoTest.java └── version-rules.xml ├── prometheus-metrics-exporter-common ├── pom.xml ├── src │ └── main │ │ └── java │ │ └── io │ │ └── prometheus │ │ └── metrics │ │ └── exporter │ │ └── common │ │ ├── PrometheusHttpExchange.java │ │ ├── PrometheusHttpRequest.java │ │ ├── PrometheusHttpResponse.java │ │ └── PrometheusScrapeHandler.java └── version-rules.xml ├── prometheus-metrics-exporter-httpserver ├── pom.xml ├── src │ ├── main │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── metrics │ │ │ └── exporter │ │ │ └── httpserver │ │ │ ├── BlockingRejectedExecutionHandler.java │ │ │ ├── DefaultHandler.java │ │ │ ├── HTTPServer.java │ │ │ ├── HealthyHandler.java │ │ │ ├── HttpExchangeAdapter.java │ │ │ ├── MetricsHandler.java │ │ │ └── NamedDaemonThreadFactory.java │ └── test │ │ └── java │ │ └── io │ │ └── prometheus │ │ └── metrics │ │ └── exporter │ │ └── httpserver │ │ ├── HTTPServerTest.java │ │ └── MetricsHandlerTest.java └── version-rules.xml ├── prometheus-metrics-exporter-opentelemetry-otel-agent-resources ├── pom.xml └── src │ └── main │ ├── java │ └── io │ │ └── prometheus │ │ └── otelagent │ │ └── ResourceAttributesFromOtelAgent.java │ └── resources │ └── lib │ └── .gitignore ├── prometheus-metrics-exporter-opentelemetry-shaded └── pom.xml ├── prometheus-metrics-exporter-opentelemetry ├── pom.xml ├── src │ ├── main │ │ ├── java │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── metrics │ │ │ │ └── exporter │ │ │ │ └── opentelemetry │ │ │ │ ├── OpenTelemetryExporter.java │ │ │ │ ├── OtelAutoConfig.java │ │ │ │ ├── PrometheusInstrumentationScope.java │ │ │ │ ├── PrometheusMetricProducer.java │ │ │ │ ├── PropertiesResourceProvider.java │ │ │ │ ├── PropertyMapper.java │ │ │ │ └── otelmodel │ │ │ │ ├── DoublePointDataImpl.java │ │ │ │ ├── ExponentialHistogramBucketsImpl.java │ │ │ │ ├── ExponentialHistogramPointDataImpl.java │ │ │ │ ├── HistogramPointDataImpl.java │ │ │ │ ├── MetricDataFactory.java │ │ │ │ ├── PointDataImpl.java │ │ │ │ ├── PrometheusClassicHistogram.java │ │ │ │ ├── PrometheusCounter.java │ │ │ │ ├── PrometheusData.java │ │ │ │ ├── PrometheusGauge.java │ │ │ │ ├── PrometheusInfo.java │ │ │ │ ├── PrometheusMetricData.java │ │ │ │ ├── PrometheusNativeHistogram.java │ │ │ │ ├── PrometheusStateSet.java │ │ │ │ ├── PrometheusSummary.java │ │ │ │ ├── PrometheusUnknown.java │ │ │ │ ├── SummaryPointDataImpl.java │ │ │ │ └── ValueAtQuantileImpl.java │ │ └── resources-filtered │ │ │ └── instrumentationScope.properties │ └── test │ │ └── java │ │ └── io │ │ └── prometheus │ │ └── metrics │ │ └── exporter │ │ └── opentelemetry │ │ ├── ExemplarTest.java │ │ ├── ExportTest.java │ │ ├── OtelAutoConfigTest.java │ │ ├── PrometheusInstrumentationScopeTest.java │ │ └── otelmodel │ │ └── PrometheusMetricDataTest.java └── version-rules.xml ├── prometheus-metrics-exporter-pushgateway ├── pom.xml ├── src │ ├── main │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── metrics │ │ │ └── exporter │ │ │ └── pushgateway │ │ │ ├── DefaultHttpConnectionFactory.java │ │ │ ├── DefaultJobLabelDetector.java │ │ │ ├── Format.java │ │ │ ├── HttpConnectionFactory.java │ │ │ ├── PushGateway.java │ │ │ └── Scheme.java │ └── test │ │ └── java │ │ └── io │ │ └── prometheus │ │ └── metrics │ │ └── exporter │ │ └── pushgateway │ │ ├── BasicAuthPushGatewayTest.java │ │ ├── BearerTokenPushGatewayTest.java │ │ ├── PushGatewayTest.java │ │ └── SchemeTest.java └── version-rules.xml ├── prometheus-metrics-exporter-servlet-jakarta ├── pom.xml ├── src │ └── main │ │ └── java │ │ └── io │ │ └── prometheus │ │ └── metrics │ │ └── exporter │ │ └── servlet │ │ └── jakarta │ │ ├── HttpExchangeAdapter.java │ │ └── PrometheusMetricsServlet.java └── version-rules.xml ├── prometheus-metrics-exporter-servlet-javax ├── pom.xml ├── src │ └── main │ │ └── java │ │ └── io │ │ └── prometheus │ │ └── metrics │ │ └── exporter │ │ └── servlet │ │ └── javax │ │ ├── HttpExchangeAdapter.java │ │ └── PrometheusMetricsServlet.java └── version-rules.xml ├── prometheus-metrics-exposition-formats-shaded └── pom.xml ├── prometheus-metrics-exposition-formats ├── generate-protobuf.sh ├── pom.xml ├── src │ ├── main │ │ ├── .gitignore │ │ ├── generated │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── metrics │ │ │ │ └── expositionformats │ │ │ │ └── generated │ │ │ │ └── com_google_protobuf_4_31_1 │ │ │ │ └── Metrics.java │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── metrics │ │ │ └── expositionformats │ │ │ └── internal │ │ │ ├── PrometheusProtobufWriterImpl.java │ │ │ └── ProtobufUtil.java │ └── test │ │ └── java │ │ └── io │ │ └── prometheus │ │ └── metrics │ │ └── expositionformats │ │ └── ProtobufExpositionFormatsTest.java └── version-rules.xml ├── prometheus-metrics-exposition-textformats ├── pom.xml └── src │ ├── main │ └── java │ │ └── io │ │ └── prometheus │ │ └── metrics │ │ └── expositionformats │ │ ├── ExpositionFormatWriter.java │ │ ├── ExpositionFormats.java │ │ ├── OpenMetricsTextFormatWriter.java │ │ ├── PrometheusProtobufWriter.java │ │ ├── PrometheusTextFormatWriter.java │ │ └── TextFormatUtil.java │ └── test │ └── java │ └── io │ └── prometheus │ └── metrics │ └── expositionformats │ ├── ExpositionFormatWriterTest.java │ ├── ExpositionFormatsTest.java │ ├── PrometheusProtobufWriterTest.java │ └── TextFormatUtilTest.java ├── prometheus-metrics-instrumentation-caffeine ├── pom.xml ├── src │ ├── main │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── metrics │ │ │ └── instrumentation │ │ │ └── caffeine │ │ │ └── CacheMetricsCollector.java │ └── test │ │ └── java │ │ └── io │ │ └── prometheus │ │ └── metrics │ │ └── instrumentation │ │ └── caffeine │ │ └── CacheMetricsCollectorTest.java └── version-rules.xml ├── prometheus-metrics-instrumentation-dropwizard ├── pom.xml ├── src │ ├── main │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── metrics │ │ │ └── instrumentation │ │ │ └── dropwizard │ │ │ └── DropwizardExports.java │ └── test │ │ └── java │ │ └── io │ │ └── prometheus │ │ └── metrics │ │ └── instrumentation │ │ └── dropwizard │ │ └── DropwizardExportsTest.java └── version-rules.xml ├── prometheus-metrics-instrumentation-dropwizard5 ├── pom.xml ├── src │ ├── main │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── metrics │ │ │ └── instrumentation │ │ │ └── dropwizard5 │ │ │ ├── DropwizardExports.java │ │ │ ├── InvalidMetricHandler.java │ │ │ └── labels │ │ │ ├── CustomLabelMapper.java │ │ │ ├── GraphiteNamePattern.java │ │ │ └── MapperConfig.java │ └── test │ │ └── java │ │ └── io │ │ └── prometheus │ │ └── metrics │ │ └── instrumentation │ │ └── dropwizard5 │ │ ├── DropwizardExportsTest.java │ │ └── labels │ │ ├── CustomLabelMapperTest.java │ │ ├── GraphiteNamePatternTest.java │ │ └── MapperConfigTest.java └── version-rules.xml ├── prometheus-metrics-instrumentation-guava ├── pom.xml ├── src │ ├── main │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── metrics │ │ │ └── instrumentation │ │ │ └── guava │ │ │ └── CacheMetricsCollector.java │ └── test │ │ └── java │ │ └── io │ │ └── prometheus │ │ └── metrics │ │ └── instrumentation │ │ └── guava │ │ └── CacheMetricsCollectorTest.java └── version-rules.xml ├── prometheus-metrics-instrumentation-jvm ├── pom.xml ├── src │ ├── main │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── metrics │ │ │ └── instrumentation │ │ │ └── jvm │ │ │ ├── JvmBufferPoolMetrics.java │ │ │ ├── JvmClassLoadingMetrics.java │ │ │ ├── JvmCompilationMetrics.java │ │ │ ├── JvmGarbageCollectorMetrics.java │ │ │ ├── JvmMemoryMetrics.java │ │ │ ├── JvmMemoryPoolAllocationMetrics.java │ │ │ ├── JvmMetrics.java │ │ │ ├── JvmNativeMemoryMetrics.java │ │ │ ├── JvmRuntimeInfoMetric.java │ │ │ ├── JvmThreadsMetrics.java │ │ │ ├── NativeImageChecker.java │ │ │ └── ProcessMetrics.java │ └── test │ │ └── java │ │ └── io │ │ └── prometheus │ │ └── metrics │ │ └── instrumentation │ │ └── jvm │ │ ├── ExampleExporterForManualTesting.java │ │ ├── JvmBufferPoolMetricsTest.java │ │ ├── JvmClassLoadingMetricsTest.java │ │ ├── JvmCompilationMetricsTest.java │ │ ├── JvmGarbageCollectorMetricsTest.java │ │ ├── JvmMemoryMetricsTest.java │ │ ├── JvmMemoryPoolAllocationMetricsTest.java │ │ ├── JvmMetricsTest.java │ │ ├── JvmNativeMemoryMetricsTest.java │ │ ├── JvmRuntimeInfoMetricTest.java │ │ ├── JvmThreadsMetricsTest.java │ │ ├── ProcessMetricsTest.java │ │ └── TestUtil.java └── version-rules.xml ├── prometheus-metrics-model ├── pom.xml ├── src │ ├── main │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── metrics │ │ │ └── model │ │ │ ├── registry │ │ │ ├── Collector.java │ │ │ ├── MetricNameFilter.java │ │ │ ├── MultiCollector.java │ │ │ ├── PrometheusRegistry.java │ │ │ └── PrometheusScrapeRequest.java │ │ │ └── snapshots │ │ │ ├── ClassicHistogramBucket.java │ │ │ ├── ClassicHistogramBuckets.java │ │ │ ├── CounterSnapshot.java │ │ │ ├── DataPointSnapshot.java │ │ │ ├── DistributionDataPointSnapshot.java │ │ │ ├── DuplicateLabelsException.java │ │ │ ├── Exemplar.java │ │ │ ├── Exemplars.java │ │ │ ├── GaugeSnapshot.java │ │ │ ├── HistogramSnapshot.java │ │ │ ├── InfoSnapshot.java │ │ │ ├── Label.java │ │ │ ├── Labels.java │ │ │ ├── MetricMetadata.java │ │ │ ├── MetricSnapshot.java │ │ │ ├── MetricSnapshots.java │ │ │ ├── NativeHistogramBucket.java │ │ │ ├── NativeHistogramBuckets.java │ │ │ ├── PrometheusNaming.java │ │ │ ├── Quantile.java │ │ │ ├── Quantiles.java │ │ │ ├── StateSetSnapshot.java │ │ │ ├── SummarySnapshot.java │ │ │ ├── Unit.java │ │ │ └── UnknownSnapshot.java │ └── test │ │ └── java │ │ └── io │ │ └── prometheus │ │ └── metrics │ │ └── model │ │ ├── registry │ │ ├── CollectorTest.java │ │ ├── MetricNameFilterTest.java │ │ ├── MultiCollectorNameFilterTest.java │ │ └── PrometheusRegistryTest.java │ │ └── snapshots │ │ ├── ClassicHistogramBucketsTest.java │ │ ├── CounterSnapshotTest.java │ │ ├── ExemplarTest.java │ │ ├── ExemplarsTest.java │ │ ├── GaugeSnapshotTest.java │ │ ├── HistogramSnapshotTest.java │ │ ├── InfoSnapshotTest.java │ │ ├── LabelTest.java │ │ ├── LabelsTest.java │ │ ├── MetricMetadataTest.java │ │ ├── MetricSnapshotTest.java │ │ ├── MetricSnapshotsTest.java │ │ ├── NativeHistogramBucketsTest.java │ │ ├── PrometheusNamingTest.java │ │ ├── QuantilesTest.java │ │ ├── SnapshotTestUtil.java │ │ ├── StateSetSnapshotTest.java │ │ ├── SummarySnapshotTest.java │ │ ├── UnitTest.java │ │ └── UnknownSnapshotTest.java └── version-rules.xml ├── prometheus-metrics-parent └── pom.xml ├── prometheus-metrics-simpleclient-bridge ├── pom.xml ├── src │ ├── main │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── metrics │ │ │ └── simpleclient │ │ │ └── bridge │ │ │ └── SimpleclientCollector.java │ └── test │ │ └── java │ │ └── io │ │ └── prometheus │ │ └── metrics │ │ └── simpleclient │ │ └── bridge │ │ └── SimpleclientCollectorTest.java └── version-rules.xml ├── prometheus-metrics-tracer ├── pom.xml ├── prometheus-metrics-tracer-common │ ├── pom.xml │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── metrics │ │ │ └── tracer │ │ │ └── common │ │ │ └── SpanContext.java │ └── version-rules.xml ├── prometheus-metrics-tracer-initializer │ ├── pom.xml │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── metrics │ │ │ └── tracer │ │ │ └── initializer │ │ │ └── SpanContextSupplier.java │ └── version-rules.xml ├── prometheus-metrics-tracer-otel-agent │ ├── pom.xml │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── metrics │ │ │ └── tracer │ │ │ └── agent │ │ │ └── OpenTelemetryAgentSpanContext.java │ └── version-rules.xml ├── prometheus-metrics-tracer-otel │ ├── pom.xml │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── metrics │ │ │ └── tracer │ │ │ └── otel │ │ │ └── OpenTelemetrySpanContext.java │ └── version-rules.xml └── version-rules.xml ├── scripts ├── build-release.sh ├── set-release-version-github-pages.sh ├── set-version.sh └── super-linter.sh ├── simpleclient-archive ├── README.md ├── integration_tests │ ├── it_common │ │ ├── pom.xml │ │ ├── src │ │ │ └── test │ │ │ │ ├── java │ │ │ │ └── io │ │ │ │ │ └── prometheus │ │ │ │ │ └── client │ │ │ │ │ └── it │ │ │ │ │ └── common │ │ │ │ │ ├── Downloader.java │ │ │ │ │ ├── LogConsumer.java │ │ │ │ │ ├── Scraper.java │ │ │ │ │ ├── Version.java │ │ │ │ │ └── Volume.java │ │ │ │ └── resources │ │ │ │ └── project_version.properties │ │ └── version-rules.xml │ ├── it_exemplars_otel_agent │ │ ├── pom.xml │ │ ├── src │ │ │ ├── main │ │ │ │ ├── java │ │ │ │ │ └── io │ │ │ │ │ │ └── prometheus │ │ │ │ │ │ └── client │ │ │ │ │ │ └── it │ │ │ │ │ │ └── exemplars_otel_agent │ │ │ │ │ │ └── ExampleSpringBootApp.java │ │ │ │ └── resources │ │ │ │ │ └── application.properties │ │ │ └── test │ │ │ │ ├── java │ │ │ │ └── io │ │ │ │ │ └── prometheus │ │ │ │ │ └── client │ │ │ │ │ └── it │ │ │ │ │ └── exemplars_otel_agent │ │ │ │ │ └── ExemplarsOpenTelemetryAgentIT.java │ │ │ │ └── resources │ │ │ │ └── logback-test.xml │ │ └── version-rules.xml │ ├── it_exemplars_otel_sdk │ │ ├── pom.xml │ │ ├── src │ │ │ ├── main │ │ │ │ └── java │ │ │ │ │ └── io │ │ │ │ │ └── prometheus │ │ │ │ │ └── client │ │ │ │ │ └── it │ │ │ │ │ └── exemplars_otel │ │ │ │ │ └── ExampleApplication.java │ │ │ └── test │ │ │ │ ├── java │ │ │ │ └── io │ │ │ │ │ └── prometheus │ │ │ │ │ └── client │ │ │ │ │ └── it │ │ │ │ │ └── exemplars_otel │ │ │ │ │ └── ExemplarsOpenTelemetrySdkIT.java │ │ │ │ └── resources │ │ │ │ └── logback-test.xml │ │ └── version-rules.xml │ ├── it_java_versions │ │ ├── pom.xml │ │ ├── src │ │ │ ├── main │ │ │ │ └── java │ │ │ │ │ └── io │ │ │ │ │ └── prometheus │ │ │ │ │ └── client │ │ │ │ │ └── it │ │ │ │ │ └── java_versions │ │ │ │ │ └── ExampleApplication.java │ │ │ └── test │ │ │ │ ├── java │ │ │ │ └── io │ │ │ │ │ └── prometheus │ │ │ │ │ └── client │ │ │ │ │ └── it │ │ │ │ │ └── java_versions │ │ │ │ │ └── JavaVersionsIT.java │ │ │ │ └── resources │ │ │ │ └── logback-test.xml │ │ └── version-rules.xml │ ├── it_log4j2 │ │ ├── pom.xml │ │ ├── src │ │ │ ├── main │ │ │ │ ├── java │ │ │ │ │ └── io │ │ │ │ │ │ └── prometheus │ │ │ │ │ │ └── client │ │ │ │ │ │ └── it │ │ │ │ │ │ └── log4j2 │ │ │ │ │ │ └── ExampleApplication.java │ │ │ │ └── resources │ │ │ │ │ └── log4j2.xml │ │ │ └── test │ │ │ │ ├── java │ │ │ │ └── io │ │ │ │ │ └── prometheus │ │ │ │ │ └── client │ │ │ │ │ └── it │ │ │ │ │ └── log4j2 │ │ │ │ │ └── Log4j2IT.java │ │ │ │ └── resources │ │ │ │ └── logback-test.xml │ │ └── version-rules.xml │ ├── it_pushgateway │ │ ├── pom.xml │ │ ├── src │ │ │ ├── main │ │ │ │ └── java │ │ │ │ │ └── io │ │ │ │ │ └── prometheus │ │ │ │ │ └── client │ │ │ │ │ └── it │ │ │ │ │ └── pushgateway │ │ │ │ │ └── ExampleBatchJob.java │ │ │ └── test │ │ │ │ ├── java │ │ │ │ └── io │ │ │ │ │ └── prometheus │ │ │ │ │ └── client │ │ │ │ │ └── it │ │ │ │ │ └── pushgateway │ │ │ │ │ └── PushGatewayIT.java │ │ │ │ └── resources │ │ │ │ ├── logback-test.xml │ │ │ │ └── web-config.yml │ │ └── version-rules.xml │ ├── it_servlet_jakarta_exporter_webxml │ │ ├── pom.xml │ │ ├── src │ │ │ ├── main │ │ │ │ ├── java │ │ │ │ │ └── io │ │ │ │ │ │ └── prometheus │ │ │ │ │ │ └── client │ │ │ │ │ │ └── it │ │ │ │ │ │ └── servlet │ │ │ │ │ │ └── jakarta │ │ │ │ │ │ └── ExampleServlet.java │ │ │ │ └── webapp │ │ │ │ │ └── WEB-INF │ │ │ │ │ └── web.xml │ │ │ └── test │ │ │ │ ├── java │ │ │ │ └── io │ │ │ │ │ └── prometheus │ │ │ │ │ └── client │ │ │ │ │ └── it │ │ │ │ │ └── servlet │ │ │ │ │ └── jakarta │ │ │ │ │ └── ServletJakartaExporterWebXmlIT.java │ │ │ │ └── resources │ │ │ │ ├── Dockerfile │ │ │ │ └── logback-test.xml │ │ └── version-rules.xml │ ├── pom.xml │ └── version-rules.xml ├── simpleclient_graphite_bridge │ ├── pom.xml │ ├── src │ │ ├── main │ │ │ └── java │ │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── client │ │ │ │ └── bridge │ │ │ │ └── Graphite.java │ │ └── test │ │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── client │ │ │ └── bridge │ │ │ └── GraphiteTest.java │ └── version-rules.xml ├── simpleclient_hibernate │ ├── pom.xml │ ├── src │ │ ├── main │ │ │ └── java │ │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── client │ │ │ │ └── hibernate │ │ │ │ └── HibernateStatisticsCollector.java │ │ └── test │ │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── client │ │ │ └── hibernate │ │ │ └── HibernateStatisticsCollectorTest.java │ └── version-rules.xml ├── simpleclient_httpserver │ ├── pom.xml │ ├── src │ │ ├── main │ │ │ └── java │ │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── client │ │ │ │ └── exporter │ │ │ │ ├── HTTPServer.java │ │ │ │ └── SampleNameFilterSupplier.java │ │ └── test │ │ │ ├── java │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── client │ │ │ │ └── exporter │ │ │ │ ├── ExampleExporter.java │ │ │ │ ├── HttpRequest.java │ │ │ │ ├── HttpResponse.java │ │ │ │ ├── TestDaemonFlags.java │ │ │ │ └── TestHTTPServer.java │ │ │ └── resources │ │ │ └── keystore.pkcs12 │ └── version-rules.xml ├── simpleclient_jetty │ ├── pom.xml │ ├── src │ │ ├── main │ │ │ └── java │ │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── client │ │ │ │ └── jetty │ │ │ │ └── JettyStatisticsCollector.java │ │ └── test │ │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── client │ │ │ └── jetty │ │ │ └── JettyStatisticsCollectorTest.java │ └── version-rules.xml ├── simpleclient_jetty_jdk8 │ ├── pom.xml │ ├── src │ │ ├── main │ │ │ └── java │ │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── client │ │ │ │ └── jetty │ │ │ │ └── QueuedThreadPoolStatisticsCollector.java │ │ └── test │ │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── client │ │ │ └── jetty │ │ │ └── QueuedThreadPoolStatisticsCollectorTest.java │ └── version-rules.xml ├── simpleclient_log4j │ ├── pom.xml │ ├── src │ │ ├── main │ │ │ └── java │ │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── client │ │ │ │ └── log4j │ │ │ │ └── InstrumentedAppender.java │ │ └── test │ │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── client │ │ │ └── log4j │ │ │ └── InstrumentedAppenderTest.java │ └── version-rules.xml ├── simpleclient_log4j2 │ ├── pom.xml │ ├── src │ │ ├── main │ │ │ └── java │ │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── client │ │ │ │ └── log4j2 │ │ │ │ └── InstrumentedAppender.java │ │ └── test │ │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── client │ │ │ └── log4j2 │ │ │ └── InstrumentedAppenderTest.java │ └── version-rules.xml ├── simpleclient_logback │ ├── pom.xml │ ├── src │ │ ├── main │ │ │ └── java │ │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── client │ │ │ │ └── logback │ │ │ │ └── InstrumentedAppender.java │ │ └── test │ │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── client │ │ │ └── logback │ │ │ └── InstrumentedAppenderTest.java │ └── version-rules.xml ├── simpleclient_servlet │ ├── pom.xml │ ├── src │ │ ├── main │ │ │ └── java │ │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── client │ │ │ │ ├── exporter │ │ │ │ └── MetricsServlet.java │ │ │ │ ├── filter │ │ │ │ └── MetricsFilter.java │ │ │ │ └── internal │ │ │ │ └── Adapter.java │ │ └── test │ │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── client │ │ │ └── exporter │ │ │ ├── ExampleBenchmark.java │ │ │ └── ExampleExporter.java │ └── version-rules.xml ├── simpleclient_servlet_common │ ├── pom.xml │ ├── src │ │ ├── main │ │ │ └── java │ │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── client │ │ │ │ └── servlet │ │ │ │ └── common │ │ │ │ ├── adapter │ │ │ │ ├── FilterConfigAdapter.java │ │ │ │ ├── HttpServletRequestAdapter.java │ │ │ │ ├── HttpServletResponseAdapter.java │ │ │ │ └── ServletConfigAdapter.java │ │ │ │ ├── exporter │ │ │ │ ├── Exporter.java │ │ │ │ └── ServletConfigurationException.java │ │ │ │ └── filter │ │ │ │ ├── Filter.java │ │ │ │ └── FilterConfigurationException.java │ │ └── test │ │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── client │ │ │ └── servlet │ │ │ └── common │ │ │ ├── exporter │ │ │ └── ExporterTest.java │ │ │ └── filter │ │ │ └── FilterTest.java │ └── version-rules.xml ├── simpleclient_servlet_jakarta │ ├── pom.xml │ ├── src │ │ ├── main │ │ │ └── java │ │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── client │ │ │ │ └── servlet │ │ │ │ └── jakarta │ │ │ │ ├── Adapter.java │ │ │ │ └── filter │ │ │ │ └── MetricsFilter.java │ │ └── test │ │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── client │ │ │ └── exporter │ │ │ ├── ExampleBenchmark.java │ │ │ └── ExampleExporter.java │ └── version-rules.xml ├── simpleclient_spring_web │ ├── pom.xml │ ├── src │ │ ├── main │ │ │ └── java │ │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── client │ │ │ │ └── spring │ │ │ │ └── web │ │ │ │ ├── EnablePrometheusTiming.java │ │ │ │ ├── MethodTimer.java │ │ │ │ └── PrometheusTimeMethod.java │ │ └── test │ │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── client │ │ │ └── spring │ │ │ └── web │ │ │ ├── MethodTimerAppTest.java │ │ │ └── MethodTimerTest.java │ └── version-rules.xml ├── simpleclient_vertx │ ├── pom.xml │ ├── src │ │ ├── main │ │ │ └── java │ │ │ │ └── io │ │ │ │ └── prometheus │ │ │ │ └── client │ │ │ │ └── vertx │ │ │ │ └── MetricsHandler.java │ │ └── test │ │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── client │ │ │ └── vertx │ │ │ ├── ExampleExporter.java │ │ │ └── MetricsHandlerTest.java │ └── version-rules.xml └── simpleclient_vertx4 │ ├── pom.xml │ ├── src │ ├── main │ │ └── java │ │ │ └── io │ │ │ └── prometheus │ │ │ └── client │ │ │ └── vertx │ │ │ └── MetricsHandler.java │ └── test │ │ └── java │ │ └── io │ │ └── prometheus │ │ └── client │ │ └── vertx │ │ ├── ExampleExporter.java │ │ └── MetricsHandlerTest.java │ └── version-rules.xml └── version-rules.xml /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | max_line_length = 100 5 | indent_size = 2 6 | 7 | [{version-rules.xml,maven-wrapper.properties,checkstyle.xml,docker-compose.yaml,docker-compose.yml,Dockerfile,example_target_info.json,mise.toml,mvnm,mvnw.cmd,generate-protobuf.sh,super-linter.env,.gitleaksignore}] 8 | max_line_length = 200 9 | 10 | [{grafana-dashboard-*.json,.editorconfig}] 11 | max_line_length = 300 12 | 13 | [pom.xml] 14 | max_line_length = 110 15 | 16 | [*.py] 17 | # checked by black 18 | indent_size = 4 19 | -------------------------------------------------------------------------------- /.github/release.yml: -------------------------------------------------------------------------------- 1 | # .github/release.yml 2 | 3 | changelog: 4 | categories: 5 | - title: 🏕 Features 6 | labels: 7 | - "*" 8 | exclude: 9 | labels: 10 | - chore 11 | - dependencies 12 | - title: 🧹 Chore 13 | labels: 14 | - chore 15 | - title: 👒 Dependencies 16 | labels: 17 | - dependencies 18 | -------------------------------------------------------------------------------- /.github/renovate.json5: -------------------------------------------------------------------------------- 1 | { 2 | $schema: "https://docs.renovatebot.com/renovate-schema.json", 3 | extends: ["config:recommended"], 4 | platformCommit: "enabled", 5 | automerge: true, 6 | dependencyDashboard: false, 7 | ignorePaths: [ 8 | "**/simpleclient-archive/**", // old projects 9 | // agent resources packages an OTel API that is the minimum required API version 10 | "**/prometheus-metrics-exporter-opentelemetry-otel-agent-resources/pom.xml", 11 | ], 12 | } 13 | -------------------------------------------------------------------------------- /.github/super-linter.env: -------------------------------------------------------------------------------- 1 | FILTER_REGEX_EXCLUDE=mvnw|src/main/generated/.*|docs/themes/.*|keystore.pkcs12|.*.java|prometheus-metrics-exporter-opentelemetry-shaded/pom.xml|CODE_OF_CONDUCT.md 2 | IGNORE_GITIGNORED_FILES=true 3 | JAVA_FILE_NAME=google_checks.xml 4 | # disable kubernetes linter - complains about resource limits, etc 5 | VALIDATE_CHECKOV=false 6 | VALIDATE_CSS=false 7 | VALIDATE_CSS_PRETTIER=false 8 | VALIDATE_DOCKERFILE_HADOLINT=false 9 | VALIDATE_GIT_COMMITLINT=false 10 | # done by maven 11 | VALIDATE_GOOGLE_JAVA_FORMAT=false 12 | # times out 13 | VALIDATE_GO_MODULES=false 14 | VALIDATE_HTML=false 15 | # done by checkstyle 16 | VALIDATE_JAVA=false 17 | # contradicting with prettier 18 | VALIDATE_JAVASCRIPT_STANDARD=false 19 | # we have many duplicate code in our codebase for demo purposes 20 | VALIDATE_JSCPD=false 21 | VALIDATE_PYTHON_PYLINT=false 22 | 23 | FIX_ENV=true 24 | FIX_GO=true 25 | FIX_JAVASCRIPT_PRETTIER=true 26 | FIX_JSON=true 27 | FIX_JSONC=true 28 | FIX_JSONC_PRETTIER=true 29 | FIX_JSON_PRETTIER=true 30 | FIX_MARKDOWN=true 31 | FIX_MARKDOWN_PRETTIER=true 32 | FIX_PYTHON_BLACK=true 33 | FIX_SHELL_SHFMT=true 34 | FIX_YAML_PRETTIER=true 35 | -------------------------------------------------------------------------------- /.github/workflows/acceptance-tests.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: OpenTelemetry Acceptance Tests 3 | 4 | on: [pull_request] 5 | 6 | permissions: {} 7 | 8 | jobs: 9 | acceptance-tests: 10 | runs-on: ubuntu-24.04 11 | steps: 12 | - name: Check out 13 | with: 14 | persist-credentials: false 15 | uses: actions/checkout@v4 16 | - uses: jdx/mise-action@13abe502c30c1559a5c37dff303831bab82c9402 # v2.2.3 17 | env: 18 | MISE_ENABLE_TOOLS: go:github.com/grafana/oats,java 19 | - name: Run acceptance tests 20 | run: mise run acceptance-test 21 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Build 3 | 4 | on: [pull_request] 5 | 6 | permissions: {} 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-24.04 11 | steps: 12 | - uses: actions/checkout@v4 13 | with: 14 | persist-credentials: false 15 | - uses: jdx/mise-action@13abe502c30c1559a5c37dff303831bab82c9402 # v2.2.3 16 | env: 17 | MISE_ENABLE_TOOLS: java,protoc 18 | - name: Cache local Maven repository 19 | uses: actions/cache@v4 20 | with: 21 | path: ~/.m2/repository 22 | key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} 23 | restore-keys: | 24 | ${{ runner.os }}-maven- 25 | - name: Run the Maven verify phase 26 | run: mise run ci 27 | -------------------------------------------------------------------------------- /.github/workflows/lint-rest.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Lint What Super Linter Can't 3 | 4 | on: [pull_request] 5 | 6 | permissions: {} 7 | 8 | jobs: 9 | lint: 10 | runs-on: ubuntu-24.04 11 | steps: 12 | - name: Check out 13 | with: 14 | persist-credentials: false 15 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 16 | - uses: jdx/mise-action@13abe502c30c1559a5c37dff303831bab82c9402 # v2.2.3 17 | env: 18 | MISE_ENABLE_TOOLS: lychee,zizmor 19 | - name: Lint 20 | run: mise run lint-rest 21 | -------------------------------------------------------------------------------- /.github/workflows/native-tests.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: GraalVM Native Tests 3 | 4 | on: [pull_request] 5 | 6 | permissions: {} 7 | 8 | jobs: 9 | native-tests: 10 | runs-on: ubuntu-24.04 11 | steps: 12 | - name: Check out 13 | with: 14 | persist-credentials: false 15 | uses: actions/checkout@v4 16 | - uses: jdx/mise-action@13abe502c30c1559a5c37dff303831bab82c9402 # v2.2.3 17 | env: 18 | MISE_ENV: native 19 | - name: Run native tests 20 | run: mise run test 21 | -------------------------------------------------------------------------------- /.github/workflows/super-linter.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Lint 3 | 4 | on: [pull_request] 5 | 6 | jobs: 7 | lint: 8 | runs-on: ubuntu-24.04 9 | 10 | permissions: 11 | contents: read 12 | packages: read 13 | # To report GitHub Actions status checks 14 | statuses: write 15 | 16 | steps: 17 | - name: Checkout code 18 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 19 | with: 20 | persist-credentials: false 21 | fetch-depth: 0 22 | 23 | - name: Load super-linter configuration 24 | run: grep -v '^#' .github/super-linter.env | grep -v 'FIX_' >> "$GITHUB_ENV" 25 | 26 | - name: Super-linter 27 | uses: super-linter/super-linter@12150456a73e248bdc94d0794898f94e23127c88 # v7.4.0 28 | env: 29 | # To report GitHub Actions status checks 30 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 31 | -------------------------------------------------------------------------------- /.github/workflows/test-release-build.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Test Build Release 3 | 4 | on: 5 | push: 6 | branches: ["main"] 7 | pull_request: 8 | branches: ["main"] 9 | 10 | permissions: {} 11 | 12 | jobs: 13 | build: 14 | runs-on: ubuntu-24.04 15 | steps: 16 | - uses: actions/checkout@v4 17 | with: 18 | persist-credentials: false 19 | - uses: jdx/mise-action@13abe502c30c1559a5c37dff303831bab82c9402 # v2.2.3 20 | env: 21 | MISE_ENABLE_TOOLS: java 22 | - name: Cache local Maven repository 23 | uses: actions/cache@v4 24 | with: 25 | path: ~/.m2/repository 26 | key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} 27 | restore-keys: | 28 | ${{ runner.os }}-maven- 29 | - name: Run the Maven verify phase 30 | run: mise run build-release 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | 3 | # Package Files # 4 | *.jar 5 | *.war 6 | *.ear 7 | 8 | .idea 9 | *.iml 10 | 11 | target/ 12 | build/ 13 | simpleclient_pushgateway/mockserver.log 14 | simpleclient_pushgateway/mockserver_request.log 15 | nb-configuration.xml 16 | dependency-reduced-pom.xml 17 | 18 | **/.classpath 19 | **.project 20 | **/.settings/ 21 | docs/public 22 | .lycheecache 23 | -------------------------------------------------------------------------------- /.gitleaksignore: -------------------------------------------------------------------------------- 1 | /tmp/lint/integration-tests/it-pushgateway/src/test/resources/pushgateway-ssl.yaml:private-key:36 2 | /github/workspace/integration-tests/it-pushgateway/src/test/resources/pushgateway-ssl.yaml:private-key:36 3 | -------------------------------------------------------------------------------- /.mvn/jvm.config: -------------------------------------------------------------------------------- 1 | --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED 2 | --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED 3 | --add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED 4 | --add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED 5 | --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED 6 | --add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED 7 | --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED 8 | --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED 9 | --add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED 10 | --add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED 11 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | wrapperVersion=3.3.2 18 | distributionType=only-script 19 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip 20 | -------------------------------------------------------------------------------- /.yaml-lint.yml: -------------------------------------------------------------------------------- 1 | extends: relaxed 2 | 3 | rules: 4 | line-length: 5 | max: 120 6 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Prometheus Community Code of Conduct 2 | 3 | Prometheus follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md). 4 | -------------------------------------------------------------------------------- /MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | # Maintainers 2 | 3 | - Fabian Stäber @fstab 4 | - Doug Hoard @dhoard 5 | - Tom Wilkie @tomwilkie 6 | - Gregor Zeitlinger @zeitlinger 7 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Prometheus instrumentation library for JVM applications 2 | Copyright 2012-2015 The Prometheus Authors 3 | 4 | This product includes software developed at 5 | Boxever Ltd. (http://www.boxever.com/). 6 | 7 | This product includes software developed at 8 | SoundCloud Ltd. (http://soundcloud.com/). 9 | 10 | This product includes software developed as part of the 11 | Ocelli project by Netflix Inc. (https://github.com/Netflix/ocelli/). 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Prometheus Java Metrics Library 2 | 3 | [![Build](https://github.com/prometheus/client_java/actions/workflows/build.yml/badge.svg)](https://github.com/prometheus/client_java/actions/workflows/build.yml) java 8+ Apache 2.0 # editorconfig-checker-disable-line 4 | 5 | ## Documentation 6 | 7 | [https://prometheus.github.io/client_java](https://prometheus.github.io/client_java) 8 | 9 | ## Contributing and community 10 | 11 | See [CONTRIBUTING.md](CONTRIBUTING.md) and 12 | the [community section](http://prometheus.io/community/) 13 | of the Prometheus homepage. 14 | 15 | The Prometheus Java community is present on the [CNCF Slack](https://cloud-native.slack.com) on 16 | `#prometheus-java`, and we have a fortnightly community call in 17 | the [Prometheus public calendar](https://prometheus.io/community/). 18 | 19 | ## Previous Releases 20 | 21 | The source code for 0.16.0 and older is on 22 | the [simpleclient](https://github.com/prometheus/client_java/tree/simpleclient) branch. 23 | 24 | ## License 25 | 26 | Apache License 2.0, see [LICENSE](LICENSE). 27 | -------------------------------------------------------------------------------- /RELEASING.md: -------------------------------------------------------------------------------- 1 | # Create a Release 2 | 3 | 1. Go to 4 | 2. Click on "Choose a tag", enter the tag name (e.g. `v0.1.0`), and click "Create a new tag". 5 | 3. Click on "Generate release notes" to auto-generate the release notes based on the commits since 6 | the last release. 7 | 4. Click on "Publish release". 8 | 9 | ## If the GPG key expired 10 | 11 | 1. Generate a new key: 12 | 13 | 2. Distribute the 14 | key: 15 | 3. use `gpg --armor --export-secret-keys YOUR_ID` to 16 | export ([docs](https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#gpg)) 17 | 4. Update the 18 | passphrase: 19 | 5. Update the GPG 20 | key: 21 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Reporting a security issue 2 | 3 | The Prometheus security policy, including how to report vulnerabilities, can be 4 | found here: 5 | 6 | 7 | -------------------------------------------------------------------------------- /benchmarks/src/main/java/io/prometheus/metrics/benchmarks/BenchmarkRunner.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.benchmarks; 2 | 3 | public class BenchmarkRunner { 4 | public static void main(String[] args) throws Exception { 5 | org.openjdk.jmh.Main.main(args); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /benchmarks/src/main/java/io/prometheus/metrics/benchmarks/RandomNumbers.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.benchmarks; 2 | 3 | import java.util.Random; 4 | import org.openjdk.jmh.annotations.Scope; 5 | import org.openjdk.jmh.annotations.State; 6 | 7 | @State(Scope.Thread) 8 | public class RandomNumbers { 9 | 10 | final double[] randomNumbers = new double[10 * 1024]; 11 | 12 | public RandomNumbers() { 13 | Random rand = new Random(0); 14 | for (int i = 0; i < randomNumbers.length; i++) { 15 | randomNumbers[i] = Math.abs(rand.nextGaussian()); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /benchmarks/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /checkstyle-suppressions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | .hugo_build.lock 2 | -------------------------------------------------------------------------------- /docs/archetypes/default.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = '{{ replace .File.ContentBaseName "-" " " | title }}' 3 | date = {{ .Date }} 4 | draft = true 5 | +++ 6 | -------------------------------------------------------------------------------- /docs/content/config/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Config 3 | weight: 5 4 | --- 5 | -------------------------------------------------------------------------------- /docs/content/exporters/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Exporters 3 | weight: 2 4 | --- 5 | -------------------------------------------------------------------------------- /docs/content/exporters/filter.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Filter 3 | weight: 2 4 | --- 5 | 6 | All exporters support a `name[]` URL parameter for querying only specific metric names. Examples: 7 | 8 | - `/metrics?name[]=jvm_threads_current` will query the metric named `jvm_threads_current`. 9 | - `/metrics?name[]=jvm_threads_current&name[]=jvm_threads_daemon` will query two metrics, 10 | `jvm_threads_current` and `jvm_threads_daemon`. 11 | 12 | Add the following to the scape job configuration in `prometheus.yml` 13 | to make the Prometheus server send the `name[]` parameter: 14 | 15 | ```yaml 16 | params: 17 | name[]: 18 | - jvm_threads_current 19 | - jvm_threads_daemon 20 | ``` 21 | -------------------------------------------------------------------------------- /docs/content/getting-started/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Getting Started 3 | weight: 1 4 | --- 5 | -------------------------------------------------------------------------------- /docs/content/instrumentation/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Instrumentation 3 | weight: 3 4 | --- 5 | -------------------------------------------------------------------------------- /docs/content/internals/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Internals 3 | weight: 7 4 | --- 5 | -------------------------------------------------------------------------------- /docs/content/migration/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Compatibility 3 | weight: 6 4 | --- 5 | -------------------------------------------------------------------------------- /docs/content/otel/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: OpenTelemetry 3 | weight: 4 4 | --- 5 | -------------------------------------------------------------------------------- /docs/data/menu/extra.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | header: 3 | - name: GitHub 4 | ref: https://github.com/prometheus/client_java 5 | icon: gdoc_github 6 | external: true 7 | -------------------------------------------------------------------------------- /docs/data/menu/more.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | more: 3 | - name: JavaDoc 4 | ref: "/client_java/api" 5 | external: true 6 | icon: "gdoc_bookmark" 7 | - name: Releases 8 | ref: "https://github.com/prometheus/client_java/releases" 9 | external: true 10 | icon: "gdoc_download" 11 | - name: Github 12 | ref: "https://github.com/prometheus/client_java" 13 | external: true 14 | icon: "gdoc_github" 15 | -------------------------------------------------------------------------------- /docs/hugo.toml: -------------------------------------------------------------------------------- 1 | baseURL = "http://localhost" 2 | languageCode = 'en-us' 3 | title = "client_java" 4 | theme = "hugo-geekdoc" 5 | 6 | pluralizeListTitles = false 7 | 8 | # Geekdoc required configuration 9 | #pygmentsUseClasses = true 10 | pygmentsUseClasses = false 11 | pygmentsCodeFences = true 12 | disablePathToLower = true 13 | # geekdocFileTreeSortBy = "linkTitle" 14 | 15 | # Required if you want to render robots.txt template 16 | enableRobotsTXT = true 17 | 18 | # Needed for mermaid shortcodes 19 | [markup] 20 | [markup.goldmark.renderer] 21 | # Needed for mermaid shortcode 22 | unsafe = true 23 | [markup.tableOfContents] 24 | startLevel = 1 25 | endLevel = 9 26 | [markup.highlight] 27 | style = 'solarized-dark' 28 | 29 | [taxonomies] 30 | tag = "tags" 31 | 32 | [caches] 33 | [caches.images] 34 | dir = ':cacheDir/images' 35 | -------------------------------------------------------------------------------- /docs/static/.gitignore: -------------------------------------------------------------------------------- 1 | api 2 | -------------------------------------------------------------------------------- /docs/static/custom.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Didn't find much time to create a theme yet, 3 | * so there are just a few non-default settings for now. 4 | */ 5 | :root, 6 | :root[color-theme="light"] { 7 | --header-background: #222222; 8 | --footer-background: #e6522c; 9 | --footer-link-color: #ffffff; 10 | --footer-link-color-visited: #ffffff; 11 | } 12 | 13 | @media (prefers-color-scheme: light) { 14 | :root { 15 | --header-background: #222222; 16 | --footer-background: #e6522c; 17 | --footer-link-color: #ffffff; 18 | --footer-link-color-visited: #ffffff; 19 | } 20 | } 21 | 22 | :root[color-theme="dark"] 23 | { 24 | --header-background: #111c24; 25 | --body-background: #1f1f21; 26 | --footer-background: #e6522c; 27 | --footer-link-color: #ffffff; 28 | --footer-link-color-visited: #ffffff; 29 | } 30 | 31 | @media (prefers-color-scheme: dark) { 32 | :root { 33 | --header-background: #111c24; 34 | --body-background: #1f1f21; 35 | --footer-background: #e6522c; 36 | --footer-link-color: #ffffff; 37 | --footer-link-color-visited: #ffffff; 38 | } 39 | } 40 | 41 | .gdoc-markdown pre,.gdoc-markdown code { 42 | overflow: auto; 43 | } -------------------------------------------------------------------------------- /docs/static/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/static/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /docs/static/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/static/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /docs/static/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/static/favicon/favicon.ico -------------------------------------------------------------------------------- /docs/static/images/model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/static/images/model.png -------------------------------------------------------------------------------- /docs/static/images/otel-pipeline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/static/images/otel-pipeline.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Robert Kaussow 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is furnished 10 | to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice (including the next 13 | paragraph) shall be included in all copies or substantial portions of the 14 | Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS 19 | OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 21 | OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/VERSION: -------------------------------------------------------------------------------- 1 | v0.41.1 2 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/archetypes/docs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ .Name | humanize | title }}" 3 | weight: 1 4 | # geekdocFlatSection: false 5 | # geekdocToc: 6 6 | # geekdocHidden: false 7 | --- 8 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/archetypes/posts.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .Name "-" " " | title }}" 3 | date: {{ .Date }} 4 | --- 5 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/assets/search/config.json: -------------------------------------------------------------------------------- 1 | {{- $searchDataFile := printf "search/%s.data.json" .Language.Lang -}} 2 | {{- $searchData := resources.Get "search/data.json" | resources.ExecuteAsTemplate $searchDataFile . | resources.Minify -}} 3 | { 4 | "dataFile": {{ $searchData.RelPermalink | jsonify }}, 5 | "indexConfig": {{ .Site.Params.geekdocSearchConfig | jsonify }}, 6 | "showParent": {{ if .Site.Params.geekdocSearchShowParent }}true{{ else }}false{{ end }}, 7 | "showDescription": {{ if .Site.Params.geekdocSearchshowDescription }}true{{ else }}false{{ end }} 8 | } 9 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/assets/search/data.json: -------------------------------------------------------------------------------- 1 | [ 2 | {{ range $index, $page := (where .Site.Pages "Params.geekdocProtected" "ne" true) }} 3 | {{ if ne $index 0 }},{{ end }} 4 | { 5 | "id": {{ $index }}, 6 | "href": "{{ $page.RelPermalink }}", 7 | "title": {{ (partial "utils/title" $page) | jsonify }}, 8 | "parent": {{ with $page.Parent }}{{ (partial "utils/title" .) | jsonify }}{{ else }}""{{ end }}, 9 | "content": {{ $page.Plain | jsonify }}, 10 | "description": {{ $page.Summary | plainify | jsonify }} 11 | } 12 | {{ end }} 13 | ] 14 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/images/readme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/images/readme.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/images/screenshot.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/images/tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/images/tn.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/_default/_markup/render-codeblock-mermaid.html: -------------------------------------------------------------------------------- 1 | 2 | {{ if not (.Page.Scratch.Get "mermaid") }} 3 | 4 | 5 | {{ .Page.Scratch.Set "mermaid" true }} 6 | {{ end }} 7 | 8 | 9 |
10 |   {{- .Inner -}}
11 | 
12 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/_default/_markup/render-heading.html: -------------------------------------------------------------------------------- 1 | {{- $showAnchor := (and (default true .Page.Params.geekdocAnchor) (default true .Page.Site.Params.geekdocAnchor)) -}} 2 | 3 | 4 | 5 | {{- if $showAnchor -}} 6 |
7 | 11 | {{ .Text | safeHTML }} 12 | 13 | 14 | 15 | 16 |
17 | {{- else -}} 18 |
19 | 23 | {{ .Text | safeHTML }} 24 | 25 |
26 | {{- end -}} 27 | 28 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/_default/_markup/render-image.html: -------------------------------------------------------------------------------- 1 | {{ .Text }} 6 | {{- /* Drop trailing newlines */ -}} 7 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/_default/_markup/render-link.html: -------------------------------------------------------------------------------- 1 | {{- $raw := or (hasPrefix .Text " 12 | {{- .Text | safeHTML -}} 13 | 14 | {{- /* Drop trailing newlines */ -}} 15 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/_default/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ partial "page-header" . }} 3 | 4 | 5 |
8 |

{{ partial "utils/title" . }}

9 | {{ partial "utils/content" . }} 10 |
11 | {{ end }} 12 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ partial "page-header" . }} 3 | 4 | 5 |
8 |

{{ partial "utils/title" . }}

9 | {{ partial "utils/content" . }} 10 |
11 | {{ end }} 12 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/_default/terms.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ range .Paginator.Pages.ByTitle }} 3 |
4 |
5 |

6 | {{ partial "utils/title" . }} 7 |

8 |
9 | 10 |
11 | 12 | {{ $pageCount := len .Pages }} 13 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | {{ $latet := index .Pages.ByDate 0 }} 23 | {{ with $latet }} 24 | {{ partial "utils/title" . }} 25 | {{ end }} 26 | 27 | 28 |
29 |
30 | {{ end }} 31 | {{ partial "pagination.html" . }} 32 | {{ end }} 33 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/partials/foot.html: -------------------------------------------------------------------------------- 1 | {{ if default true .Site.Params.geekdocSearch }} 2 | 3 | {{- $searchConfigFile := printf "search/%s.config.json" .Language.Lang -}} 4 | {{- $searchConfig := resources.Get "search/config.json" | resources.ExecuteAsTemplate $searchConfigFile . | resources.Minify -}} 5 | {{- $searchConfig.Publish -}} 6 | {{ end }} 7 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/partials/head/custom.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/partials/head/favicons.html: -------------------------------------------------------------------------------- 1 | 2 | 8 | 14 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/partials/head/meta.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ hugo.Generator }} 6 | 7 | {{ $keywords := default .Site.Params.Keywords .Keywords }} 8 | 9 | {{- with partial "utils/description" . }} 10 | 11 | {{- end }} 12 | {{- with $keywords }} 13 | 14 | {{- end }} 15 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/partials/head/microformats.html: -------------------------------------------------------------------------------- 1 | {{ partial "microformats/opengraph.html" . }} 2 | {{ partial "microformats/twitter_cards.html" . }} 3 | {{ partial "microformats/schema" . }} 4 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/partials/head/rel-me.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/partials/microformats/twitter_cards.html: -------------------------------------------------------------------------------- 1 | {{- with partial "utils/featured" . }} 2 | 3 | {{- else }} 4 | 5 | {{- end }} 6 | 7 | {{- with partial "utils/featured" . }} 8 | 9 | {{- end }} 10 | {{- with partial "utils/description" . }} 11 | 12 | {{- end }} 13 | {{- with .Site.Params.Social.twitter -}} 14 | 15 | {{- end }} 16 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/partials/pagination.html: -------------------------------------------------------------------------------- 1 | {{ $pag := $.Paginator }} 2 | 3 | 4 | 23 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/partials/search.html: -------------------------------------------------------------------------------- 1 | {{ if default true .Site.Params.geekdocSearch }} 2 | 16 | {{ end }} 17 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/partials/svg-icon-symbols.html: -------------------------------------------------------------------------------- 1 | {{ range resources.Match "sprites/*.svg" }} 2 | {{ printf "" . | safeHTML }} 3 | {{ .Content | safeHTML }} 4 | {{ end }} 5 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/partials/utils/content.html: -------------------------------------------------------------------------------- 1 | {{ $content := .Content }} 2 | 3 | {{ $content = $content | replaceRE `` `` | safeHTML }} 4 | {{ $content = $content | replaceRE `((?:.|\n)+?
)` `
${1}
` | safeHTML }} 5 | 6 | {{ return $content }} 7 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/partials/utils/description.html: -------------------------------------------------------------------------------- 1 | {{ $isPage := or (and (ne .Type "posts") (in "section page" .Kind )) (and (eq .Type "posts") (eq .Kind "page")) }} 2 | {{ $description := "" }} 3 | 4 | {{ if .Description }} 5 | {{ $description = .Description }} 6 | {{ else }} 7 | {{ if $isPage }} 8 | {{ $description = .Summary }} 9 | {{ else if .Site.Params.description }} 10 | {{ $description = .Site.Params.description }} 11 | {{ end }} 12 | {{ end }} 13 | 14 | {{ return $description }} 15 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/partials/utils/featured.html: -------------------------------------------------------------------------------- 1 | {{ $img := "" }} 2 | 3 | {{ with $source := ($.Resources.ByType "image").GetMatch "{*feature*,*cover*,*thumbnail*}" }} 4 | {{ $featured := .Fill (printf "1200x630 %s" (default "Smart" .Params.anchor)) }} 5 | {{ $img = $featured.Permalink }} 6 | {{ else }} 7 | {{ with default $.Site.Params.images $.Params.images }} 8 | {{ $img = index . 0 | absURL }} 9 | {{ end }} 10 | {{ end }} 11 | 12 | {{ return $img }} 13 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/partials/utils/title.html: -------------------------------------------------------------------------------- 1 | {{ $title := "" }} 2 | 3 | {{ if .Title }} 4 | {{ $title = .Title }} 5 | {{ else if and .IsSection .File }} 6 | {{ $title = path.Base .File.Dir | humanize | title }} 7 | {{ else if and .IsPage .File }} 8 | {{ $title = .File.BaseFileName | humanize | title }} 9 | {{ end }} 10 | 11 | {{ return $title }} 12 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/posts/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 |
4 |

{{ partial "utils/title" . }}

5 | 8 |
9 |
10 | {{ partial "utils/content" . }} 11 |
12 |
13 | {{ end }} 14 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: /tags/* 3 | 4 | Sitemap: {{ "sitemap.xml" | absURL }} 5 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/shortcodes/button.html: -------------------------------------------------------------------------------- 1 | {{- $ref := "" }} 2 | {{- $class := "" }} 3 | {{- $size := default "regular" (.Get "size" | lower) }} 4 | 5 | {{- if not (in (slice "regular" "large") $size) }} 6 | {{- $size = "regular" }} 7 | {{- end }} 8 | 9 | {{- with .Get "href" }} 10 | {{- $ref = . }} 11 | {{- end }} 12 | 13 | {{- with .Get "relref" }} 14 | {{- $ref = relref $ . }} 15 | {{- end }} 16 | 17 | {{- with .Get "class" }} 18 | {{- $class = . }} 19 | {{- end }} 20 | 21 | 22 | 23 | 27 | {{ $.Inner }} 28 | 29 | 30 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/shortcodes/columns.html: -------------------------------------------------------------------------------- 1 | {{- $size := default "regular" (.Get "size" | lower) }} 2 | 3 | {{- if not (in (slice "regular" "large" "small") $size) }} 4 | {{- $size = "regular" }} 5 | {{- end }} 6 | 7 | 8 |
9 | {{- range split .Inner "<--->" }} 10 |
11 | {{ . | $.Page.RenderString -}} 12 |
13 | {{- end }} 14 |
15 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/shortcodes/expand.html: -------------------------------------------------------------------------------- 1 | {{ $id := substr (sha1 .Inner) 0 8 }} 2 |
3 | 7 | 8 |
9 | {{ .Inner | $.Page.RenderString }} 10 |
11 |
12 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/shortcodes/hint.html: -------------------------------------------------------------------------------- 1 | {{ $type := default "note" (.Get "type") }} 2 | {{ $icon := .Get "icon" }} 3 | {{ $title := default ($type | title) (.Get "title") }} 4 | 5 | 6 |
7 |
8 | {{- with $icon -}} 9 | 10 | {{ $title }} 11 | {{- else -}} 12 | 13 | {{- end -}} 14 |
15 |
{{ .Inner | $.Page.RenderString }}
16 |
17 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/shortcodes/icon.html: -------------------------------------------------------------------------------- 1 | {{ $id := .Get 0 }} 2 | 3 | {{- with $id -}} 4 | 5 | {{- end -}} 6 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/shortcodes/include.html: -------------------------------------------------------------------------------- 1 | {{ $file := .Get "file" }} 2 | {{ $page := .Site.GetPage $file }} 3 | {{ $type := .Get "type" }} 4 | {{ $language := .Get "language" }} 5 | {{ $options :=.Get "options" }} 6 | 7 | 8 |
9 | {{- if (.Get "language") -}} 10 | {{- highlight ($file | readFile) $language (default "linenos=table" $options) -}} 11 | {{- else if eq $type "html" -}} 12 | {{- $file | readFile | safeHTML -}} 13 | {{- else if eq $type "page" -}} 14 | {{- with $page }}{{ .Content }}{{ end -}} 15 | {{- else -}} 16 | {{- $file | readFile | $.Page.RenderString -}} 17 | {{- end -}} 18 |
19 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/shortcodes/katex.html: -------------------------------------------------------------------------------- 1 | 2 | {{ if not (.Page.Scratch.Get "katex") }} 3 | 4 | 8 | 9 | {{ .Page.Scratch.Set "katex" true }} 10 | {{ end }} 11 | 12 | 13 | 14 | {{ cond (in .Params "display") "\\[" "\\(" -}} 15 | {{- trim .Inner "\n" -}} 16 | {{- cond (in .Params "display") "\\]" "\\)" -}} 17 | 18 | {{- /* Drop trailing newlines */ -}} 19 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/shortcodes/mermaid.html: -------------------------------------------------------------------------------- 1 | 2 | {{ if not (.Page.Scratch.Get "mermaid") }} 3 | 4 | 5 | {{ .Page.Scratch.Set "mermaid" true }} 6 | {{ end }} 7 | 8 | 9 |
10 |   {{- .Inner -}}
11 | 
12 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/shortcodes/progress.html: -------------------------------------------------------------------------------- 1 | {{- $value := default 0 (.Get "value") -}} 2 | {{- $title := .Get "title" -}} 3 | {{- $icon := .Get "icon" -}} 4 | 5 | 6 |
7 |
8 |
9 | {{ with $icon -}} 10 | 11 | {{- end }} 12 | {{ with $title }}{{ . }}{{ end }} 13 |
14 |
{{ $value }}%
15 |
16 |
17 |
22 |
23 |
24 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/shortcodes/tab.html: -------------------------------------------------------------------------------- 1 | {{- if .Parent }} 2 | {{- $name := .Get 0 }} 3 | {{- $group := printf "tabs-%s" (.Parent.Get 0) }} 4 | 5 | {{- if not (.Parent.Scratch.Get $group) }} 6 | {{- .Parent.Scratch.Set $group slice }} 7 | {{- end }} 8 | 9 | {{- .Parent.Scratch.Add $group (dict "Name" $name "Content" .Inner) }} 10 | {{- else }} 11 | {{ errorf "%q: 'tab' shortcode must be inside 'tabs' shortcode" .Page.Path }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/shortcodes/tabs.html: -------------------------------------------------------------------------------- 1 | {{- if .Inner }}{{ end }} 2 | {{- $id := .Get 0 }} 3 | {{- $group := printf "tabs-%s" $id }} 4 | 5 | 6 |
7 | {{- range $index, $tab := .Scratch.Get $group }} 8 | 15 | 18 |
19 | {{ .Content | $.Page.RenderString }} 20 |
21 | {{- end }} 22 |
23 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/layouts/shortcodes/toc.html: -------------------------------------------------------------------------------- 1 | {{- $format := default "html" (.Get "format") }} 2 | {{- $tocLevels := default (default 6 .Site.Params.geekdocToC) .Page.Params.geekdocToC }} 3 | 4 | {{- if and $tocLevels .Page.TableOfContents -}} 5 | {{- if not (eq ($format | lower) "raw") -}} 6 |
7 | {{ .Page.TableOfContents }} 8 |
9 |
10 | {{- else -}} 11 | {{ .Page.TableOfContents }} 12 | {{- end -}} 13 | {{- end -}} 14 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/custom.css: -------------------------------------------------------------------------------- 1 | /* You can add custom styles here. */ 2 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/android-chrome-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/android-chrome-144x144.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/android-chrome-192x192.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/android-chrome-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/android-chrome-256x256.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/android-chrome-36x36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/android-chrome-36x36.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/android-chrome-384x384.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/android-chrome-384x384.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/android-chrome-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/android-chrome-48x48.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/android-chrome-512x512.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/android-chrome-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/android-chrome-72x72.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/android-chrome-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/android-chrome-96x96.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon-1024x1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon-1024x1024.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon-114x114.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon-144x144.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon-167x167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon-167x167.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon-57x57.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon-72x72.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon-precomposed.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-icon.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-1125x2436.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-1125x2436.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-1136x640.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-1136x640.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-1170x2532.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-1170x2532.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-1242x2208.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-1242x2208.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-1242x2688.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-1242x2688.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-1284x2778.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-1284x2778.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-1334x750.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-1334x750.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-1536x2048.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-1536x2048.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-1620x2160.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-1620x2160.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-1668x2224.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-1668x2224.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-1668x2388.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-1668x2388.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-1792x828.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-1792x828.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-2048x1536.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-2048x1536.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-2048x2732.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-2048x2732.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-2160x1620.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-2160x1620.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-2208x1242.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-2208x1242.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-2224x1668.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-2224x1668.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-2388x1668.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-2388x1668.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-2436x1125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-2436x1125.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-2532x1170.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-2532x1170.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-2688x1242.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-2688x1242.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-2732x2048.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-2732x2048.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-2778x1284.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-2778x1284.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-640x1136.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-640x1136.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-750x1334.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-750x1334.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-828x1792.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/apple-touch-startup-image-828x1792.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/browserconfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | #efefef 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/favicon-48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/favicon-48x48.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/favicon.ico -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/mstile-144x144.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/mstile-150x150.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/mstile-310x150.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/mstile-310x310.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/favicon/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/favicon/mstile-70x70.png -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/GeekdocIcons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/GeekdocIcons.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/GeekdocIcons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/GeekdocIcons.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_AMS-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_AMS-Regular.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_AMS-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_AMS-Regular.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Caligraphic-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Caligraphic-Bold.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Caligraphic-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Caligraphic-Bold.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Caligraphic-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Caligraphic-Regular.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Caligraphic-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Caligraphic-Regular.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Fraktur-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Fraktur-Bold.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Fraktur-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Fraktur-Bold.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Fraktur-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Fraktur-Regular.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Fraktur-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Fraktur-Regular.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Main-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Main-Bold.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Main-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Main-Bold.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Main-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Main-BoldItalic.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Main-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Main-BoldItalic.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Main-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Main-Italic.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Main-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Main-Italic.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Main-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Main-Regular.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Main-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Main-Regular.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Math-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Math-BoldItalic.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Math-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Math-BoldItalic.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Math-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Math-Italic.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Math-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Math-Italic.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_SansSerif-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_SansSerif-Bold.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_SansSerif-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_SansSerif-Bold.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_SansSerif-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_SansSerif-Italic.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_SansSerif-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_SansSerif-Italic.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_SansSerif-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_SansSerif-Regular.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_SansSerif-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_SansSerif-Regular.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Script-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Script-Regular.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Script-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Script-Regular.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Size1-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Size1-Regular.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Size1-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Size1-Regular.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Size2-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Size2-Regular.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Size2-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Size2-Regular.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Size3-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Size3-Regular.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Size3-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Size3-Regular.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Size4-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Size4-Regular.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Size4-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Size4-Regular.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Typewriter-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Typewriter-Regular.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/KaTeX_Typewriter-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/KaTeX_Typewriter-Regular.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/LiberationMono.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/LiberationMono.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/LiberationMono.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/LiberationMono.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/LiberationSans-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/LiberationSans-Bold.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/LiberationSans-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/LiberationSans-Bold.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/LiberationSans-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/LiberationSans-BoldItalic.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/LiberationSans-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/LiberationSans-BoldItalic.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/LiberationSans-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/LiberationSans-Italic.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/LiberationSans-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/LiberationSans-Italic.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/LiberationSans.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/LiberationSans.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/LiberationSans.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/LiberationSans.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/Metropolis.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/Metropolis.woff -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/fonts/Metropolis.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/docs/themes/hugo-geekdoc/static/fonts/Metropolis.woff2 -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/js/637-86fbbecd.chunk.min.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * Wait for document loaded before starting the execution 3 | */ 4 | 5 | /*! @license DOMPurify 3.0.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.5/LICENSE */ 6 | 7 | /*! Check if previously processed */ 8 | 9 | /*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ 10 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/js/662-17acb8f4.chunk.min.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable 3 | Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) 4 | Licensed under The MIT License (http://opensource.org/licenses/MIT) 5 | */ 6 | 7 | /*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */ 8 | 9 | /*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */ 10 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/js/main-924a1933.bundle.min.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * clipboard.js v2.0.11 3 | * https://clipboardjs.com/ 4 | * 5 | * Licensed MIT © Zeno Rocha 6 | */ 7 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/js/search-9719be99.bundle.min.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /**! 2 | * FlexSearch.js v0.7.31 (Compact) 3 | * Copyright 2018-2022 Nextapps GmbH 4 | * Author: Thomas Wilkerling 5 | * Licence: Apache-2.0 6 | * https://github.com/nextapps-de/flexsearch 7 | */ 8 | -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/static/print-735ccc12.min.css: -------------------------------------------------------------------------------- 1 | @media print{.gdoc-nav,.gdoc-footer .container span:not(:first-child),.gdoc-paging,.editpage{display:none}.gdoc-footer{border-top:1px solid #dee2e6}.gdoc-markdown pre{white-space:pre-wrap;overflow-wrap:break-word}.chroma code{border:1px solid #dee2e6;padding:.5rem !important;font-weight:normal !important}.gdoc-markdown code{font-weight:bold}a,a:visited{color:inherit !important;text-decoration:none !important}.gdoc-toc{flex:none}.gdoc-toc nav{position:relative;width:auto}.wrapper{display:block}.wrapper main{display:block}} -------------------------------------------------------------------------------- /docs/themes/hugo-geekdoc/theme.toml: -------------------------------------------------------------------------------- 1 | name = "Geekdoc" 2 | license = "MIT" 3 | licenselink = "https://github.com/thegeeklab/hugo-geekdoc/blob/main/LICENSE" 4 | description = "Hugo theme made for documentation" 5 | homepage = "https://geekdocs.de/" 6 | demosite = "https://geekdocs.de/" 7 | tags = ["docs", "documentation", "responsive", "simple"] 8 | min_version = "0.112.0" 9 | 10 | [author] 11 | name = "Robert Kaussow" 12 | homepage = "https://thegeeklab.de/" 13 | -------------------------------------------------------------------------------- /examples/example-exemplars-tail-sampling/config/grafana-dashboards.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | providers: 4 | - name: "Example Dashboard" 5 | type: file 6 | options: 7 | path: /etc/grafana/example-dashboard.json 8 | foldersFromFilesStructure: false 9 | -------------------------------------------------------------------------------- /examples/example-exemplars-tail-sampling/config/grafana-datasources.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: 1 3 | 4 | datasources: 5 | - name: Prometheus 6 | type: prometheus 7 | uid: prometheus 8 | url: http://localhost:9090 9 | 10 | - name: Tempo 11 | type: tempo 12 | uid: tempo 13 | url: http://localhost:3200 14 | 15 | - name: Prometheus 16 | type: prometheus 17 | uid: prometheus 18 | url: http://localhost:9090 19 | jsonData: 20 | exemplarTraceIdDestinations: 21 | - name: trace_id 22 | datasourceUid: tempo 23 | -------------------------------------------------------------------------------- /examples/example-exemplars-tail-sampling/config/k6-script.js: -------------------------------------------------------------------------------- 1 | import http from "k6/http"; 2 | 3 | export const options = { 4 | scenarios: { 5 | constant_request_rate: { 6 | executor: "constant-arrival-rate", 7 | rate: 50, 8 | timeUnit: "1s", 9 | duration: "2h", 10 | preAllocatedVUs: 10, 11 | maxVUs: 100, 12 | }, 13 | }, 14 | }; 15 | 16 | export default function () { 17 | http.get("http://localhost:8080"); 18 | } 19 | -------------------------------------------------------------------------------- /examples/example-exemplars-tail-sampling/config/otelcol-config.yaml: -------------------------------------------------------------------------------- 1 | receivers: 2 | otlp: 3 | protocols: 4 | grpc: 5 | http: 6 | 7 | processors: 8 | batch: 9 | tail_sampling: 10 | expected_new_traces_per_sec: 10 11 | policies: 12 | [ 13 | { 14 | name: keep-exemplars, 15 | type: string_attribute, 16 | string_attribute: { key: "exemplar", values: ["true"] }, 17 | }, 18 | { name: keep-10-percent, type: probabilistic, probabilistic: { sampling_percentage: 10 } }, 19 | ] 20 | 21 | exporters: 22 | otlphttp: 23 | endpoint: http://localhost:4418 24 | 25 | service: 26 | pipelines: 27 | traces: 28 | receivers: [otlp] 29 | processors: [tail_sampling, batch] 30 | exporters: [otlphttp] 31 | -------------------------------------------------------------------------------- /examples/example-exemplars-tail-sampling/config/prometheus.yaml: -------------------------------------------------------------------------------- 1 | global: 2 | scrape_interval: 5s 3 | 4 | scrape_configs: 5 | - job_name: "tempo" 6 | static_configs: 7 | - targets: ["localhost:3200"] 8 | - job_name: "hello-world-app" 9 | static_configs: 10 | - targets: ["localhost:8080"] 11 | - job_name: "greeting-service" 12 | static_configs: 13 | - targets: ["localhost:8081"] 14 | -------------------------------------------------------------------------------- /examples/example-exemplars-tail-sampling/config/tempo-config.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | http_listen_port: 3200 3 | grpc_listen_port: 9096 4 | 5 | distributor: 6 | receivers: 7 | otlp: 8 | protocols: 9 | grpc: 10 | endpoint: "localhost:4417" 11 | http: 12 | endpoint: "localhost:4418" 13 | 14 | storage: 15 | trace: 16 | backend: local 17 | wal: 18 | path: /tmp/tempo/wal 19 | local: 20 | path: /tmp/tempo/blocks 21 | -------------------------------------------------------------------------------- /examples/example-exemplars-tail-sampling/example-greeting-service/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | .*-M[0-9]+ 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/example-exemplars-tail-sampling/example-hello-world-app/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | .*-M[0-9]+ 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/example-exemplars-tail-sampling/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | 8 | io.prometheus 9 | examples 10 | 1.4.0-SNAPSHOT 11 | 12 | 13 | example-exemplars-tail-sampling 14 | pom 15 | 16 | Example - Exemplars with OpenTelemetry's Tail Sampling 17 | 18 | Example project showing Examplars with OpenTelemetry's Tail Sampling. 19 | 20 | 21 | 22 | 11 23 | 24 | 25 | 26 | example-greeting-service 27 | example-hello-world-app 28 | 29 | 30 | -------------------------------------------------------------------------------- /examples/example-exporter-multi-target/src/main/java/io/prometheus/metrics/examples/multitarget/Main.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.examples.multitarget; 2 | 3 | import io.prometheus.metrics.exporter.httpserver.HTTPServer; 4 | import io.prometheus.metrics.model.registry.PrometheusRegistry; 5 | import java.io.IOException; 6 | 7 | /** Simple example of an application exposing metrics via Prometheus' built-in HTTPServer. */ 8 | public class Main { 9 | 10 | public static void main(String[] args) throws IOException, InterruptedException { 11 | 12 | SampleMultiCollector xmc = new SampleMultiCollector(); 13 | PrometheusRegistry.defaultRegistry.register(xmc); 14 | HTTPServer server = HTTPServer.builder().port(9401).buildAndStart(); 15 | 16 | System.out.println( 17 | "HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics"); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /examples/example-exporter-opentelemetry/README.md: -------------------------------------------------------------------------------- 1 | # OpenTelemetry Exporter Example 2 | 3 | ## Build 4 | 5 | This example is built as part of the `client_java` project. 6 | 7 | ```shell 8 | ./mvnw package 9 | ``` 10 | 11 | ## Run 12 | 13 | Assuming `./examples/example-exporter-opentelemetry/target/example-exporter-opentelemetry.jar` is 14 | present, run the demo with: 15 | 16 | ```bash 17 | cd ./examples/example-exporter-opentelemetry/ 18 | docker-compose up 19 | ``` 20 | 21 | This will set up the following scenario: 22 | 23 | 24 | 25 | ```mermaid 26 | flowchart LR 27 | A[example app] -->|OTLP|B[OpenTelemetry collector] -->|Prometheus remote write|C[Prometheus server] 28 | ``` 29 | 30 | 31 | 32 | The OpenTelemetry collector is configured to log incoming metrics to the console. 33 | The Prometheus server is running on [http://localhost:9090](http://localhost:9090). 34 | -------------------------------------------------------------------------------- /examples/example-exporter-opentelemetry/config/otelcol-config.yaml: -------------------------------------------------------------------------------- 1 | receivers: 2 | otlp: 3 | protocols: 4 | grpc: 5 | http: 6 | 7 | processors: 8 | batch: 9 | 10 | exporters: 11 | prometheusremotewrite: 12 | endpoint: http://localhost:9090/api/v1/write 13 | logging: 14 | verbosity: detailed 15 | 16 | service: 17 | pipelines: 18 | metrics: 19 | receivers: [otlp] 20 | processors: [batch] 21 | exporters: [logging, prometheusremotewrite] 22 | -------------------------------------------------------------------------------- /examples/example-exporter-opentelemetry/config/prometheus.yaml: -------------------------------------------------------------------------------- 1 | # empty, because this Prometheus instance receives all metrics via remote write. 2 | -------------------------------------------------------------------------------- /examples/example-exporter-opentelemetry/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | prometheus-opentelemetry-example-app: 4 | image: openjdk:11.0.16-jre 5 | network_mode: host 6 | ports: 7 | - "5005:5005" 8 | volumes: 9 | - ./target/example-exporter-opentelemetry.jar:/example-exporter-opentelemetry.jar 10 | command: 11 | - java 12 | - -jar 13 | #- -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005 14 | - /example-exporter-opentelemetry.jar 15 | collector: 16 | image: otel/opentelemetry-collector-contrib:0.127.0 17 | network_mode: host 18 | volumes: 19 | - ./config/otelcol-config.yaml:/config.yaml 20 | command: 21 | - --config=file:/config.yaml 22 | prometheus: 23 | image: prom/prometheus:v3.4.1 24 | network_mode: host 25 | volumes: 26 | - ./config/prometheus.yaml:/prometheus.yaml 27 | command: 28 | - --enable-feature=exemplar-storage 29 | - --enable-feature=native-histograms 30 | - --web.enable-remote-write-receiver 31 | - --config.file=/prometheus.yaml 32 | -------------------------------------------------------------------------------- /examples/example-exporter-opentelemetry/oats-tests/agent/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM eclipse-temurin:21.0.7_6-jre 2 | 3 | COPY target/example-exporter-opentelemetry.jar ./app.jar 4 | # check that the resource attributes from the agent are used, epsecially the service.instance.id should be the same 5 | ADD --chmod=644 https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v2.8.0/opentelemetry-javaagent.jar /usr/src/app/opentelemetry-javaagent.jar 6 | ENV JAVA_TOOL_OPTIONS=-javaagent:/usr/src/app/opentelemetry-javaagent.jar 7 | 8 | #ENTRYPOINT [ "java", "-Dotel.javaagent.debug=true","-jar", "./app.jar" ] # for debugging 9 | ENTRYPOINT [ "java", "-jar", "./app.jar" ] 10 | -------------------------------------------------------------------------------- /examples/example-exporter-opentelemetry/oats-tests/agent/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # OATS is an acceptance testing framework for OpenTelemetry - https://github.com/grafana/oats/tree/main/yaml 2 | version: "3.4" 3 | 4 | services: 5 | java: 6 | build: 7 | context: ../.. 8 | dockerfile: oats-tests/agent/Dockerfile 9 | environment: 10 | OTEL_SERVICE_NAME: "rolldice" 11 | OTEL_EXPORTER_OTLP_ENDPOINT: http://lgtm:4317 12 | OTEL_EXPORTER_OTLP_PROTOCOL: grpc 13 | OTEL_METRIC_EXPORT_INTERVAL: "5000" # so we don't have to wait 60s for metrics 14 | -------------------------------------------------------------------------------- /examples/example-exporter-opentelemetry/oats-tests/agent/oats.yaml: -------------------------------------------------------------------------------- 1 | # OATS is an acceptance testing framework for OpenTelemetry - 2 | # https://github.com/grafana/oats/tree/main/yaml 3 | docker-compose: 4 | files: 5 | - ./docker-compose.yml 6 | expected: 7 | custom-checks: 8 | - script: ./service_instance_id_check.py 9 | metrics: 10 | - promql: "uptime_seconds_total{}" 11 | value: ">= 0" 12 | -------------------------------------------------------------------------------- /examples/example-exporter-opentelemetry/oats-tests/http/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM eclipse-temurin:21.0.7_6-jre 2 | 3 | COPY target/example-exporter-opentelemetry.jar ./app.jar 4 | 5 | ENTRYPOINT [ "java", "-jar", "./app.jar" ] 6 | -------------------------------------------------------------------------------- /examples/example-exporter-opentelemetry/oats-tests/http/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # OATS is an acceptance testing framework for OpenTelemetry - https://github.com/grafana/oats/tree/main/yaml 2 | version: "3.4" 3 | 4 | services: 5 | java: 6 | build: 7 | context: ../.. 8 | dockerfile: oats-tests/http/Dockerfile 9 | environment: 10 | OTEL_SERVICE_NAME: "rolldice" 11 | OTEL_EXPORTER_OTLP_ENDPOINT: http://lgtm:4318 12 | OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf 13 | OTEL_METRIC_EXPORT_INTERVAL: "5000" # so we don't have to wait 60s for metrics 14 | -------------------------------------------------------------------------------- /examples/example-exporter-opentelemetry/oats-tests/http/oats.yaml: -------------------------------------------------------------------------------- 1 | # OATS is an acceptance testing framework for OpenTelemetry - 2 | # https://github.com/grafana/oats/tree/main/yaml 3 | docker-compose: 4 | files: 5 | - ./docker-compose.yml 6 | expected: 7 | metrics: 8 | - promql: "uptime_seconds_total{}" 9 | value: ">= 0" 10 | -------------------------------------------------------------------------------- /examples/example-exporter-servlet-tomcat/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | .*-M[0-9]+ 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/example-native-histogram/README.md: -------------------------------------------------------------------------------- 1 | # Native Histogram End-to-End Example 2 | 3 | ## Build 4 | 5 | This example is built as part of the `client_java` project. 6 | 7 | ```shell 8 | ./mvnw package 9 | ``` 10 | 11 | This should create the file 12 | `./examples/example-native-histogram/target/example-native-histogram.jar`. 13 | 14 | ## Run 15 | 16 | With `./examples/example-native-histogram/target/example-native-histogram.jar` present, simply run: 17 | 18 | ```shell 19 | cd ./examples/example-native-histogram/ 20 | docker-compose up 21 | ``` 22 | 23 | This will run the following Docker containers: 24 | 25 | - [http://localhost:9400/metrics](http://localhost:9400/metrics) example application 26 | - [http://localhost:9090](http://localhost:9090) Prometheus server 27 | - [http://localhost:3000](http://localhost:3000) Grafana (user _admin_, password _admin_) 28 | 29 | You might need to replace `localhost` with `host.docker.internal` on macOS or Windows. 30 | 31 | The Grafana server is preconfigured with two dashboards, one based on the classic histogram and the 32 | other one based on the native histogram. 33 | -------------------------------------------------------------------------------- /examples/example-native-histogram/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | example-application: 4 | image: eclipse-temurin:21.0.7_6-jre 5 | network_mode: host 6 | volumes: 7 | - ./target/example-native-histogram.jar:/example-native-histogram.jar 8 | command: 9 | - /opt/java/openjdk/bin/java 10 | - -jar 11 | - /example-native-histogram.jar 12 | prometheus: 13 | image: prom/prometheus:v3.4.1 14 | network_mode: host 15 | volumes: 16 | - ./docker-compose/prometheus.yml:/prometheus.yml 17 | command: 18 | - --enable-feature=native-histograms 19 | - --config.file=/prometheus.yml 20 | grafana: 21 | image: grafana/grafana:12.0.1 22 | network_mode: host 23 | volumes: 24 | - ./docker-compose/grafana-datasources.yaml:/etc/grafana/provisioning/datasources/grafana-datasources.yaml 25 | - ./docker-compose/grafana-dashboards.yaml:/etc/grafana/provisioning/dashboards/grafana-dashboards.yaml 26 | - ./docker-compose/grafana-dashboard-classic-histogram.json:/etc/grafana/grafana-dashboard-classic-histogram.json 27 | - ./docker-compose/grafana-dashboard-native-histogram.json:/etc/grafana/grafana-dashboard-native-histogram.json 28 | -------------------------------------------------------------------------------- /examples/example-native-histogram/docker-compose/grafana-dashboards.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | providers: 4 | - name: "Classic Histogram Example" 5 | type: file 6 | options: 7 | path: /etc/grafana/grafana-dashboard-classic-histogram.json 8 | foldersFromFilesStructure: false 9 | - name: "Native Histogram Example" 10 | type: file 11 | options: 12 | path: /etc/grafana/grafana-dashboard-native-histogram.json 13 | foldersFromFilesStructure: false 14 | -------------------------------------------------------------------------------- /examples/example-native-histogram/docker-compose/grafana-datasources.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | datasources: 4 | - name: Prometheus 5 | type: prometheus 6 | uid: prometheus 7 | url: http://localhost:9090 8 | -------------------------------------------------------------------------------- /examples/example-native-histogram/docker-compose/prometheus.yml: -------------------------------------------------------------------------------- 1 | --- 2 | global: 3 | scrape_interval: 5s # very short interval for demo purposes 4 | 5 | scrape_configs: 6 | - job_name: "demo" 7 | # this will make Prometheus scrape both, the native and the classic histogram. 8 | scrape_classic_histograms: true 9 | static_configs: 10 | - targets: ["localhost:9400"] 11 | -------------------------------------------------------------------------------- /examples/example-prometheus-properties/README.md: -------------------------------------------------------------------------------- 1 | # prometheus.properties Example 2 | 3 | ## Build 4 | 5 | This example is built as part of the `client_java` project. 6 | 7 | ```shell 8 | ./mvnw package 9 | ``` 10 | 11 | This should create the file 12 | `./examples/example-prometheus-properties/target/example-prometheus-properties.jar`. 13 | 14 | ## Run 15 | 16 | ```shell 17 | java -jar ./examples/example-prometheus-properties/target/example-prometheus-properties.jar 18 | ``` 19 | 20 | View the metrics 21 | on [http://localhost:9401/metrics?name[]=request_duration_seconds&name[]=request_size_bytes](http://localhost:9401/metrics?name[]=request_duration_seconds&name[]=request_size_bytes). 22 | 23 | The example has a `prometheus.properties` file in the classpath with a few examples of how to change 24 | settings at runtime. 25 | 26 | There are multiple alternative ways to specify the location of the `prometheus.properties` file: 27 | 28 | - Put it in the classpath, like in this example. 29 | - Set the environment variable `PROMETHEUS_CONFIG` to the file location. 30 | - Set the `prometheus.config` System property to the file location. 31 | -------------------------------------------------------------------------------- /examples/example-prometheus-properties/src/main/resources/prometheus.properties: -------------------------------------------------------------------------------- 1 | io.prometheus.exporter.httpServer.port = 9401 2 | io.prometheus.exporter.includeCreatedTimestamps = true 3 | 4 | # Set a new default for all histograms 5 | io.prometheus.metrics.histogramClassicUpperBounds = .2, .4, .8, .1 6 | 7 | # Override the default for one specific histogram 8 | io.prometheus.metrics.request_size_bytes.histogramClassicUpperBounds = 256, 512, 768, 1024 9 | -------------------------------------------------------------------------------- /examples/example-simpleclient-bridge/README.md: -------------------------------------------------------------------------------- 1 | # Built-in HTTPServer for Exposing Metrics 2 | 3 | ## Build 4 | 5 | This example is built as part of the `client_java` project. 6 | 7 | ```shell 8 | ./mvnw package 9 | ``` 10 | 11 | ## Run 12 | 13 | The build creates a JAR file with the example application in 14 | `./examples/example-simpleclient-bridge/target/`. 15 | 16 | ```shell 17 | java -jar ./examples/example-simpleclient-bridge/target/example-simpleclient-bridge.jar 18 | ``` 19 | 20 | This should expose a metrics endpoint 21 | on [http://localhost:9400/metrics](http://localhost:9400/metrics). 22 | The `events_total` counter should be exposed.with a Web browser should yield an example of a counter 23 | metric. 24 | 25 | ```text 26 | # HELP events_total total number of events 27 | # TYPE events_total counter 28 | events_total 1.0 29 | ``` 30 | -------------------------------------------------------------------------------- /examples/example-simpleclient-bridge/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | .*(alpha|beta)-[0-9] 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /integration-tests/it-common/src/test/java/io/prometheus/client/it/common/LogConsumer.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.client.it.common; 2 | 3 | import java.util.function.Consumer; 4 | import org.testcontainers.containers.output.OutputFrame; 5 | 6 | /** Print Docker logs from TestContainers to stdout or stderr. */ 7 | public class LogConsumer implements Consumer { 8 | 9 | private final String prefix; 10 | 11 | private LogConsumer(String prefix) { 12 | this.prefix = prefix; 13 | } 14 | 15 | public static LogConsumer withPrefix(String prefix) { 16 | return new LogConsumer(prefix); 17 | } 18 | 19 | @Override 20 | public void accept(OutputFrame outputFrame) { 21 | switch (outputFrame.getType()) { 22 | case STDOUT -> System.out.print(prefix + " - " + outputFrame.getUtf8String()); 23 | case END -> System.out.println(prefix + " - END"); 24 | default -> // STDERR or unexpected 25 | System.err.print(prefix + " - " + outputFrame.getUtf8String()); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /integration-tests/it-common/src/test/resources/project_version.properties: -------------------------------------------------------------------------------- 1 | # ${project.version} will be replaced by Maven at built time 2 | # when this file is copied to the target/ directory. 3 | project.version=${project.version} 4 | -------------------------------------------------------------------------------- /integration-tests/it-common/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /integration-tests/it-exporter/it-exporter-httpserver-sample/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /integration-tests/it-exporter/it-exporter-servlet-jetty-sample/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /integration-tests/it-exporter/it-exporter-servlet-tomcat-sample/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | .*-M[0-9]+ 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /integration-tests/it-exporter/it-exporter-test/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | io.prometheus 8 | it-exporter 9 | 1.4.0-SNAPSHOT 10 | 11 | 12 | it-exporter-test 13 | 14 | Integration Tests - Exporter Test Implementations 15 | 16 | Integration Tests for Exporters 17 | 18 | 19 | 20 | 21 | io.prometheus 22 | it-common 23 | test-jar 24 | ${project.version} 25 | test 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /integration-tests/it-exporter/it-exporter-test/src/test/java/io/prometheus/metrics/it/exporter/test/HttpServerIT.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.it.exporter.test; 2 | 3 | import java.io.IOException; 4 | import java.net.URISyntaxException; 5 | 6 | class HttpServerIT extends ExporterIT { 7 | public HttpServerIT() throws IOException, URISyntaxException { 8 | super("exporter-httpserver-sample"); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /integration-tests/it-exporter/it-exporter-test/src/test/java/io/prometheus/metrics/it/exporter/test/JettyIT.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.it.exporter.test; 2 | 3 | import java.io.IOException; 4 | import java.net.URISyntaxException; 5 | 6 | class JettyIT extends ExporterIT { 7 | public JettyIT() throws IOException, URISyntaxException { 8 | super("exporter-servlet-jetty-sample"); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /integration-tests/it-exporter/it-exporter-test/src/test/java/io/prometheus/metrics/it/exporter/test/TomcatIT.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.it.exporter.test; 2 | 3 | import java.io.IOException; 4 | import java.net.URISyntaxException; 5 | 6 | class TomcatIT extends ExporterIT { 7 | public TomcatIT() throws IOException, URISyntaxException { 8 | super("exporter-servlet-tomcat-sample"); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /integration-tests/it-exporter/it-exporter-test/src/test/resources/debug-openmetrics.txt: -------------------------------------------------------------------------------- 1 | # TYPE integration_test info 2 | # HELP integration_test Info metric on this integration test 3 | integration_test_info{test_name=""} 1 4 | # TYPE temperature_celsius gauge 5 | # UNIT temperature_celsius celsius 6 | # HELP temperature_celsius Temperature in Celsius 7 | temperature_celsius{location="inside"} 23.0 8 | temperature_celsius{location="outside"} 27.0 9 | # TYPE uptime_seconds counter 10 | # UNIT uptime_seconds seconds 11 | # HELP uptime_seconds total number of seconds since this application was started 12 | uptime_seconds_total 17.0 13 | # EOF 14 | -------------------------------------------------------------------------------- /integration-tests/it-exporter/it-exporter-test/src/test/resources/debug-protobuf.txt: -------------------------------------------------------------------------------- 1 | name: "integration_test_info" 2 | help: "Info metric on this integration test" 3 | type: GAUGE 4 | metric { 5 | label { 6 | name: "test_name" 7 | value: "" 8 | } 9 | gauge { 10 | value: 1.0 11 | } 12 | } 13 | name: "temperature_celsius" 14 | help: "Temperature in Celsius" 15 | type: GAUGE 16 | metric { 17 | label { 18 | name: "location" 19 | value: "inside" 20 | } 21 | gauge { 22 | value: 23.0 23 | } 24 | } 25 | metric { 26 | label { 27 | name: "location" 28 | value: "outside" 29 | } 30 | gauge { 31 | value: 27.0 32 | } 33 | } 34 | name: "uptime_seconds_total" 35 | help: "total number of seconds since this application was started" 36 | type: COUNTER 37 | metric { 38 | counter { 39 | value: 17.0 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /integration-tests/it-exporter/it-exporter-test/src/test/resources/debug-text.txt: -------------------------------------------------------------------------------- 1 | # HELP integration_test_info Info metric on this integration test 2 | # TYPE integration_test_info gauge 3 | integration_test_info{test_name=""} 1 4 | # HELP temperature_celsius Temperature in Celsius 5 | # TYPE temperature_celsius gauge 6 | temperature_celsius{location="inside"} 23.0 7 | temperature_celsius{location="outside"} 27.0 8 | # HELP uptime_seconds_total total number of seconds since this application was started 9 | # TYPE uptime_seconds_total counter 10 | uptime_seconds_total 17.0 11 | -------------------------------------------------------------------------------- /integration-tests/it-exporter/it-exporter-test/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /integration-tests/it-exporter/it-no-protobuf-test/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | io.prometheus 8 | it-exporter 9 | 1.4.0-SNAPSHOT 10 | 11 | 12 | it-no-protobuf-test 13 | 14 | Integration Test - No Protobuf 15 | 16 | Integration tests without protobuf 17 | 18 | 19 | 20 | 21 | io.prometheus 22 | it-common 23 | test-jar 24 | ${project.version} 25 | test 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /integration-tests/it-exporter/it-no-protobuf-test/src/test/java/io/prometheus/metrics/it/noprotobuf/NoProtobufIT.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.it.noprotobuf; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | 5 | import io.prometheus.client.it.common.ExporterTest; 6 | import java.io.IOException; 7 | import java.net.URISyntaxException; 8 | import org.junit.jupiter.api.Test; 9 | 10 | class NoProtobufIT extends ExporterTest { 11 | 12 | public NoProtobufIT() throws IOException, URISyntaxException { 13 | super("exporter-no-protobuf"); 14 | } 15 | 16 | @Test 17 | public void testPrometheusProtobufDebugFormat() throws IOException { 18 | start(); 19 | assertThat(scrape("GET", "debug=text").status).isEqualTo(200); 20 | // protobuf is not supported 21 | assertThat(scrape("GET", "debug=prometheus-protobuf").status).isEqualTo(500); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /integration-tests/it-exporter/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | io.prometheus 8 | integration-tests 9 | 1.4.0-SNAPSHOT 10 | 11 | 12 | it-exporter 13 | pom 14 | 15 | Integration Tests - Exporter 16 | 17 | Integration tests for the Exporter modules 18 | 19 | 20 | 21 | it-exporter-servlet-tomcat-sample 22 | it-exporter-servlet-jetty-sample 23 | it-exporter-httpserver-sample 24 | it-exporter-no-protobuf 25 | it-exporter-test 26 | it-no-protobuf-test 27 | 28 | 29 | -------------------------------------------------------------------------------- /integration-tests/it-exporter/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /integration-tests/it-pushgateway/src/test/resources/prometheus-basicauth.yaml: -------------------------------------------------------------------------------- 1 | global: 2 | scrape_interval: 5s 3 | 4 | scrape_configs: 5 | - job_name: "push" 6 | honor_labels: true 7 | static_configs: 8 | - targets: ["pushgateway:9091"] 9 | basic_auth: 10 | username: "my_user" 11 | password: "secret_password" 12 | -------------------------------------------------------------------------------- /integration-tests/it-pushgateway/src/test/resources/prometheus-ssl.yaml: -------------------------------------------------------------------------------- 1 | global: 2 | scrape_interval: 5s 3 | 4 | scrape_configs: 5 | - job_name: "push" 6 | honor_labels: true 7 | scheme: https 8 | static_configs: 9 | - targets: ["pushgateway:9091"] 10 | tls_config: 11 | insecure_skip_verify: true 12 | -------------------------------------------------------------------------------- /integration-tests/it-pushgateway/src/test/resources/prometheus.yaml: -------------------------------------------------------------------------------- 1 | global: 2 | scrape_interval: 5s 3 | 4 | scrape_configs: 5 | - job_name: "push" 6 | honor_labels: true 7 | static_configs: 8 | - targets: ["pushgateway:9091"] 9 | -------------------------------------------------------------------------------- /integration-tests/it-pushgateway/src/test/resources/pushgateway-basicauth.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | basic_auth_users: 3 | # Note: The bcrypt hash of the password was generated 4 | # with the following command line: 5 | # python -c 'import bcrypt; print(bcrypt.hashpw(b"secret_password", 6 | # bcrypt.gensalt(rounds=10)).decode("ascii"))' 7 | my_user: $2b$10$kmIxr/4wpcORDXnKLvTMC.WPGqT8nqjBm8AI3MqGkzcSrWJioTfUG 8 | -------------------------------------------------------------------------------- /integration-tests/it-pushgateway/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /integration-tests/it-spring-boot-smoke-test/src/main/java/io/prometheus/metrics/it/springboot/Application.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.it.springboot; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class Application { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(Application.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /integration-tests/it-spring-boot-smoke-test/src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | management: 2 | endpoints: 3 | web: 4 | exposure: 5 | include: "*" 6 | -------------------------------------------------------------------------------- /integration-tests/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /lychee.toml: -------------------------------------------------------------------------------- 1 | max_retries = 6 2 | exclude_loopback = true 3 | cache = true 4 | 5 | base = "https://prometheus.github.io" 6 | exclude_path = ["docs/themes"] 7 | exclude = [ 8 | '^https://github\.com/prometheus/client_java/settings', 9 | '#', 10 | 'CONTRIBUTING.md', 11 | 'LICENSE', 12 | 'MAINTAINERS.md' 13 | ] 14 | 15 | 16 | -------------------------------------------------------------------------------- /mise.native.toml: -------------------------------------------------------------------------------- 1 | [tools] 2 | java = "graalvm-community-24.0.1" 3 | 4 | [tasks.test] 5 | depends = "build" 6 | run = "../../mvnw test -PnativeTest" 7 | dir = "integration-tests/it-spring-boot-smoke-test" 8 | 9 | -------------------------------------------------------------------------------- /prometheus-metrics-bom/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /prometheus-metrics-config/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | io.prometheus 8 | client_java 9 | 1.4.0-SNAPSHOT 10 | 11 | 12 | prometheus-metrics-config 13 | bundle 14 | 15 | Prometheus Metrics Config 16 | 17 | Configuration for Prometheus metrics and exposition formats. 18 | 19 | 20 | 21 | io.prometheus.metrics.config 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /prometheus-metrics-config/src/main/java/io/prometheus/metrics/config/PrometheusPropertiesException.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.config; 2 | 3 | public class PrometheusPropertiesException extends RuntimeException { 4 | 5 | private static final long serialVersionUID = 0L; 6 | 7 | public PrometheusPropertiesException(String msg) { 8 | super(msg); 9 | } 10 | 11 | public PrometheusPropertiesException(String msg, Exception cause) { 12 | super(msg, cause); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /prometheus-metrics-config/src/test/java/io/prometheus/metrics/config/ExporterHttpServerPropertiesTest.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.config; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | import static org.assertj.core.api.Assertions.assertThatExceptionOfType; 5 | 6 | import java.util.HashMap; 7 | import java.util.Map; 8 | import org.junit.jupiter.api.Test; 9 | 10 | class ExporterHttpServerPropertiesTest { 11 | @Test 12 | void load() { 13 | ExporterHttpServerProperties properties = 14 | load(Map.of("io.prometheus.exporter.httpServer.port", "1")); 15 | assertThat(properties.getPort()).isOne(); 16 | 17 | assertThatExceptionOfType(PrometheusPropertiesException.class) 18 | .isThrownBy(() -> load(Map.of("io.prometheus.exporter.httpServer.port", "0"))) 19 | .withMessage("io.prometheus.exporter.httpServer.port: Expecting value > 0. Found: 0"); 20 | } 21 | 22 | @Test 23 | void builder() { 24 | assertThat(ExporterHttpServerProperties.builder().port(1).build().getPort()).isOne(); 25 | } 26 | 27 | private static ExporterHttpServerProperties load(Map map) { 28 | return ExporterHttpServerProperties.load(new HashMap<>(map)); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /prometheus-metrics-config/src/test/resources/emptyUpperBounds.properties: -------------------------------------------------------------------------------- 1 | io.prometheus.metrics.histogramClassicUpperBounds =, 2 | -------------------------------------------------------------------------------- /prometheus-metrics-config/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /prometheus-metrics-core/src/main/java/io/prometheus/metrics/core/datapoints/DataPoint.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.core.datapoints; 2 | 3 | public interface DataPoint {} 4 | -------------------------------------------------------------------------------- /prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/datapoints/CounterDataPointTest.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.core.datapoints; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | 5 | import io.prometheus.metrics.model.snapshots.Labels; 6 | import org.junit.jupiter.api.Test; 7 | 8 | class CounterDataPointTest { 9 | 10 | private double value = 0; 11 | 12 | @Test 13 | void inc() { 14 | CounterDataPoint counterDataPoint = 15 | new CounterDataPoint() { 16 | @Override 17 | public void inc(double value) { 18 | CounterDataPointTest.this.value += value; 19 | } 20 | 21 | @Override 22 | public void incWithExemplar(double amount, Labels labels) {} 23 | 24 | @Override 25 | public long getLongValue() { 26 | return 0; 27 | } 28 | 29 | @Override 30 | public double get() { 31 | return 0; 32 | } 33 | }; 34 | counterDataPoint.inc(1); 35 | assertThat(value).isOne(); 36 | counterDataPoint.incWithExemplar(1, null); 37 | assertThat(value).isEqualTo(2); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/datapoints/TimerApiTest.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.core.datapoints; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | class TimerApiTest { 8 | 9 | private double time = 0; 10 | 11 | private io.prometheus.metrics.core.datapoints.Timer timer = 12 | new io.prometheus.metrics.core.datapoints.Timer(t -> time = t) {}; 13 | private TimerApi api = () -> timer; 14 | 15 | @Test 16 | void runnable() { 17 | api.time(() -> {}); 18 | assertThat(time).isPositive(); 19 | } 20 | 21 | @Test 22 | void supplier() { 23 | assertThat(api.time(() -> "foo")).isEqualTo("foo"); 24 | assertThat(time).isPositive(); 25 | } 26 | 27 | @Test 28 | void callable() throws Exception { 29 | assertThat(api.timeChecked(() -> "foo")).isEqualTo("foo"); 30 | assertThat(time).isPositive(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/TestUtil.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.core.metrics; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | import static org.assertj.core.data.Offset.offset; 5 | 6 | import io.prometheus.metrics.model.snapshots.Exemplar; 7 | import io.prometheus.metrics.model.snapshots.Label; 8 | 9 | class TestUtil { 10 | 11 | public static void assertExemplarEquals(Exemplar expected, Exemplar actual) { 12 | // ignore timestamp 13 | assertThat(actual.getValue()).isCloseTo(expected.getValue(), offset(0.00001)); 14 | assertThat((Iterable) actual.getLabels()).isEqualTo(expected.getLabels()); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /prometheus-metrics-core/src/test/java/io/prometheus/metrics/core/metrics/TodoTest.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.core.metrics; 2 | 3 | class TodoTest { 4 | 5 | // if a metric with labels is created but never used it has no data. 6 | // The registry's collect() method should skip those metrics to avoid illegal protobuf or text 7 | // format. 8 | 9 | // callback versions of metrics 10 | 11 | // build() called with name == null 12 | 13 | // call inc() without labels, but the metric was created with labels 14 | 15 | // call inc() with labels, but the metric was created without labels 16 | 17 | // for performance: Use return value of withLabels() directly 18 | } 19 | -------------------------------------------------------------------------------- /prometheus-metrics-core/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /prometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpExchange.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.exporter.common; 2 | 3 | import java.io.IOException; 4 | 5 | public interface PrometheusHttpExchange extends AutoCloseable { 6 | PrometheusHttpRequest getRequest(); 7 | 8 | PrometheusHttpResponse getResponse(); 9 | 10 | void handleException(IOException e) throws IOException; 11 | 12 | void handleException(RuntimeException e); 13 | 14 | @Override 15 | void close(); 16 | } 17 | -------------------------------------------------------------------------------- /prometheus-metrics-exporter-common/src/main/java/io/prometheus/metrics/exporter/common/PrometheusHttpResponse.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.exporter.common; 2 | 3 | import java.io.IOException; 4 | import java.io.OutputStream; 5 | 6 | public interface PrometheusHttpResponse { 7 | 8 | /** See {@code jakarta.servlet.http.HttpServletResponse.setHeader(String, String)} */ 9 | void setHeader(String name, String value); 10 | 11 | /** 12 | * This is equivalent to calling {@link 13 | * com.sun.net.httpserver.HttpExchange#sendResponseHeaders(int, long)} followed by {@link 14 | * com.sun.net.httpserver.HttpExchange#getResponseBody()}. 15 | */ 16 | OutputStream sendHeadersAndGetBody(int statusCode, int contentLength) throws IOException; 17 | } 18 | -------------------------------------------------------------------------------- /prometheus-metrics-exporter-common/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /prometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/BlockingRejectedExecutionHandler.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.exporter.httpserver; 2 | 3 | import java.util.concurrent.RejectedExecutionHandler; 4 | import java.util.concurrent.ThreadPoolExecutor; 5 | 6 | class BlockingRejectedExecutionHandler implements RejectedExecutionHandler { 7 | 8 | @Override 9 | public void rejectedExecution(Runnable runnable, ThreadPoolExecutor threadPoolExecutor) { 10 | if (!threadPoolExecutor.isShutdown()) { 11 | try { 12 | threadPoolExecutor.getQueue().put(runnable); 13 | } catch (InterruptedException ignored) { 14 | // ignore 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /prometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/HealthyHandler.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.exporter.httpserver; 2 | 3 | import com.sun.net.httpserver.HttpExchange; 4 | import com.sun.net.httpserver.HttpHandler; 5 | import java.io.IOException; 6 | import java.nio.charset.StandardCharsets; 7 | 8 | /** Handler for the /-/healthy endpoint */ 9 | public class HealthyHandler implements HttpHandler { 10 | 11 | private final byte[] responseBytes; 12 | private final String contentType; 13 | 14 | public HealthyHandler() { 15 | String responseString = "Exporter is healthy.\n"; 16 | this.responseBytes = responseString.getBytes(StandardCharsets.UTF_8); 17 | this.contentType = "text/plain; charset=utf-8"; 18 | } 19 | 20 | @Override 21 | public void handle(HttpExchange exchange) throws IOException { 22 | try { 23 | exchange.getResponseHeaders().set("Content-Type", contentType); 24 | exchange.getResponseHeaders().set("Content-Length", Integer.toString(responseBytes.length)); 25 | exchange.sendResponseHeaders(200, responseBytes.length); 26 | exchange.getResponseBody().write(responseBytes); 27 | } finally { 28 | exchange.close(); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /prometheus-metrics-exporter-httpserver/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /prometheus-metrics-exporter-opentelemetry-otel-agent-resources/src/main/resources/lib/.gitignore: -------------------------------------------------------------------------------- 1 | *.jar 2 | -------------------------------------------------------------------------------- /prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/DoublePointDataImpl.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.exporter.opentelemetry.otelmodel; 2 | 3 | import io.opentelemetry.api.common.Attributes; 4 | import io.opentelemetry.sdk.metrics.data.DoubleExemplarData; 5 | import io.opentelemetry.sdk.metrics.data.DoublePointData; 6 | import java.util.List; 7 | 8 | class DoublePointDataImpl extends PointDataImpl implements DoublePointData { 9 | 10 | private final double value; 11 | 12 | public DoublePointDataImpl( 13 | double value, 14 | long startEpochNanos, 15 | long epochNanos, 16 | Attributes attributes, 17 | List exemplars) { 18 | super(startEpochNanos, epochNanos, attributes, exemplars); 19 | this.value = value; 20 | } 21 | 22 | @Override 23 | public double getValue() { 24 | return value; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /prometheus-metrics-exporter-opentelemetry/src/main/java/io/prometheus/metrics/exporter/opentelemetry/otelmodel/ValueAtQuantileImpl.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.exporter.opentelemetry.otelmodel; 2 | 3 | import io.opentelemetry.sdk.metrics.data.ValueAtQuantile; 4 | 5 | public class ValueAtQuantileImpl implements ValueAtQuantile { 6 | 7 | private final double quantile; 8 | private final double value; 9 | 10 | public ValueAtQuantileImpl(double quantile, double value) { 11 | this.quantile = quantile; 12 | this.value = value; 13 | } 14 | 15 | @Override 16 | public double getQuantile() { 17 | return quantile; 18 | } 19 | 20 | @Override 21 | public double getValue() { 22 | return value; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /prometheus-metrics-exporter-opentelemetry/src/main/resources-filtered/instrumentationScope.properties: -------------------------------------------------------------------------------- 1 | # Variables will be replaced by Maven at build time 2 | # when this file is copied to the target/ directory. 3 | instrumentationScope.name=${project.artifactId} 4 | instrumentationScope.version=${project.version} 5 | -------------------------------------------------------------------------------- /prometheus-metrics-exporter-opentelemetry/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /prometheus-metrics-exporter-pushgateway/src/main/java/io/prometheus/metrics/exporter/pushgateway/DefaultHttpConnectionFactory.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.exporter.pushgateway; 2 | 3 | import java.io.IOException; 4 | import java.net.HttpURLConnection; 5 | import java.net.URL; 6 | 7 | /** 8 | * This can be used for creating {@link Scheme#HTTP} and {@link Scheme#HTTPS} connections. 9 | * 10 | *

However, if you want to use it with {@link Scheme#HTTPS} you must make sure that the keychain 11 | * for verifying the server certificate is set up correctly. For an example of how to skip 12 | * certificate verification see {@code PushGatewayTestApp} in {@code 13 | * integration-tests/it-pushgateway/}. 14 | */ 15 | public class DefaultHttpConnectionFactory implements HttpConnectionFactory { 16 | @Override 17 | public HttpURLConnection create(URL url) throws IOException { 18 | return (HttpURLConnection) url.openConnection(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /prometheus-metrics-exporter-pushgateway/src/main/java/io/prometheus/metrics/exporter/pushgateway/Format.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.exporter.pushgateway; 2 | 3 | public enum Format { 4 | PROMETHEUS_PROTOBUF, 5 | PROMETHEUS_TEXT 6 | } 7 | -------------------------------------------------------------------------------- /prometheus-metrics-exporter-pushgateway/src/main/java/io/prometheus/metrics/exporter/pushgateway/HttpConnectionFactory.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.exporter.pushgateway; 2 | 3 | import java.io.IOException; 4 | import java.net.HttpURLConnection; 5 | import java.net.URL; 6 | 7 | /** See {@link DefaultHttpConnectionFactory}. */ 8 | @FunctionalInterface 9 | public interface HttpConnectionFactory { 10 | HttpURLConnection create(URL url) throws IOException; 11 | } 12 | -------------------------------------------------------------------------------- /prometheus-metrics-exporter-pushgateway/src/main/java/io/prometheus/metrics/exporter/pushgateway/Scheme.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.exporter.pushgateway; 2 | 3 | public enum Scheme { 4 | HTTP("http"), 5 | HTTPS("https"); 6 | 7 | private final String name; 8 | 9 | Scheme(String name) { 10 | this.name = name; 11 | } 12 | 13 | @Override 14 | public String toString() { 15 | return name; 16 | } 17 | 18 | public static Scheme fromString(String name) { 19 | switch (name) { 20 | case "http": 21 | return HTTP; 22 | case "https": 23 | return HTTPS; 24 | default: 25 | throw new IllegalArgumentException( 26 | name + ": Unsupported scheme. Expecting 'http' or 'https'."); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /prometheus-metrics-exporter-pushgateway/src/test/java/io/prometheus/metrics/exporter/pushgateway/SchemeTest.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.exporter.pushgateway; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | import static org.assertj.core.api.Assertions.assertThatExceptionOfType; 5 | 6 | import org.junit.jupiter.api.Test; 7 | 8 | class SchemeTest { 9 | 10 | @Test 11 | void fromString() { 12 | assertThat(Scheme.HTTP).hasToString("http"); 13 | assertThat(Scheme.HTTPS).hasToString("https"); 14 | assertThatExceptionOfType(IllegalArgumentException.class) 15 | .isThrownBy(() -> Scheme.fromString("ftp")) 16 | .withMessage("ftp: Unsupported scheme. Expecting 'http' or 'https'."); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /prometheus-metrics-exporter-pushgateway/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /prometheus-metrics-exporter-servlet-jakarta/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /prometheus-metrics-exporter-servlet-javax/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /prometheus-metrics-exposition-formats/src/main/.gitignore: -------------------------------------------------------------------------------- 1 | protobuf/ 2 | -------------------------------------------------------------------------------- /prometheus-metrics-exposition-formats/src/main/java/io/prometheus/metrics/expositionformats/internal/ProtobufUtil.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.expositionformats.internal; 2 | 3 | import com.google.protobuf.MessageOrBuilder; 4 | import com.google.protobuf.TextFormat; 5 | import com.google.protobuf.Timestamp; 6 | 7 | public class ProtobufUtil { 8 | 9 | static Timestamp timestampFromMillis(long timestampMillis) { 10 | return Timestamp.newBuilder() 11 | .setSeconds(timestampMillis / 1000L) 12 | .setNanos((int) (timestampMillis % 1000L * 1000000L)) 13 | .build(); 14 | } 15 | 16 | public static String shortDebugString(MessageOrBuilder protobufData) { 17 | return TextFormat.printer().emittingSingleLine(true).printToString(protobufData); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /prometheus-metrics-exposition-formats/src/test/java/io/prometheus/metrics/expositionformats/ProtobufExpositionFormatsTest.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.expositionformats; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | 5 | import io.prometheus.metrics.expositionformats.generated.com_google_protobuf_4_31_1.Metrics; 6 | import io.prometheus.metrics.expositionformats.internal.PrometheusProtobufWriterImpl; 7 | import io.prometheus.metrics.expositionformats.internal.ProtobufUtil; 8 | import io.prometheus.metrics.model.snapshots.MetricSnapshot; 9 | 10 | class ProtobufExpositionFormatsTest extends ExpositionFormatsTest { 11 | 12 | @Override 13 | protected void assertPrometheusProtobuf(String expected, MetricSnapshot snapshot) { 14 | PrometheusProtobufWriterImpl writer = new PrometheusProtobufWriterImpl(); 15 | Metrics.MetricFamily protobufData = writer.convert(snapshot); 16 | String actual = ProtobufUtil.shortDebugString(protobufData); 17 | assertThat(actual).isEqualTo(expected); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /prometheus-metrics-exposition-formats/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /prometheus-metrics-exposition-textformats/src/main/java/io/prometheus/metrics/expositionformats/ExpositionFormatWriter.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.expositionformats; 2 | 3 | import io.prometheus.metrics.model.snapshots.MetricSnapshots; 4 | import java.io.ByteArrayOutputStream; 5 | import java.io.IOException; 6 | import java.io.OutputStream; 7 | 8 | public interface ExpositionFormatWriter { 9 | boolean accepts(String acceptHeader); 10 | 11 | /** Text formats use UTF-8 encoding. */ 12 | void write(OutputStream out, MetricSnapshots metricSnapshots) throws IOException; 13 | 14 | default String toDebugString(MetricSnapshots metricSnapshots) { 15 | ByteArrayOutputStream out = new ByteArrayOutputStream(); 16 | try { 17 | write(out, metricSnapshots); 18 | return out.toString("UTF-8"); 19 | } catch (IOException e) { 20 | throw new RuntimeException(e); 21 | } 22 | } 23 | 24 | String getContentType(); 25 | 26 | /** 27 | * Returns true if the writer is available. If false, the writer will throw an exception if used. 28 | */ 29 | default boolean isAvailable() { 30 | return true; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /prometheus-metrics-exposition-textformats/src/test/java/io/prometheus/metrics/expositionformats/ExpositionFormatWriterTest.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.expositionformats; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | 5 | import io.prometheus.metrics.model.snapshots.MetricSnapshots; 6 | import org.junit.jupiter.api.Test; 7 | 8 | class ExpositionFormatWriterTest { 9 | 10 | private final ExpositionFormatWriter writer = OpenMetricsTextFormatWriter.create(); 11 | 12 | @Test 13 | void toDebugString() { 14 | assertThat(writer.toDebugString(new MetricSnapshots())).isEqualTo("# EOF\n"); 15 | } 16 | 17 | @Test 18 | void isAvailable() { 19 | assertThat(writer.isAvailable()).isTrue(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /prometheus-metrics-exposition-textformats/src/test/java/io/prometheus/metrics/expositionformats/PrometheusProtobufWriterTest.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.expositionformats; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | import static org.assertj.core.api.Assertions.assertThatCode; 5 | 6 | import org.junit.jupiter.api.Test; 7 | 8 | class PrometheusProtobufWriterTest { 9 | 10 | private final PrometheusProtobufWriter writer = new PrometheusProtobufWriter(); 11 | 12 | @Test 13 | void accepts() { 14 | assertThat(writer.accepts(null)).isFalse(); 15 | } 16 | 17 | @Test 18 | void getContentType() { 19 | assertThat(writer.getContentType()) 20 | .isEqualTo( 21 | "application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; " 22 | + "encoding=delimited"); 23 | } 24 | 25 | @Test 26 | void write() { 27 | assertThatCode(() -> writer.write(null, null)) 28 | .isInstanceOf(UnsupportedOperationException.class); 29 | } 30 | 31 | @Test 32 | void toDebugString() { 33 | assertThatCode(() -> writer.toDebugString(null)) 34 | .isInstanceOf(UnsupportedOperationException.class); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /prometheus-metrics-instrumentation-caffeine/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /prometheus-metrics-instrumentation-dropwizard/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /prometheus-metrics-instrumentation-dropwizard5/src/main/java/io/prometheus/metrics/instrumentation/dropwizard5/InvalidMetricHandler.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.instrumentation.dropwizard5; 2 | 3 | @FunctionalInterface 4 | public interface InvalidMetricHandler { 5 | InvalidMetricHandler ALWAYS_THROW = (metricName, exc) -> false; 6 | 7 | /** 8 | * @param metricName the name of the metric that was collected. 9 | * @param exc The exception that was thrown when producing the metric snapshot. 10 | * @return true if the exception should be suppressed. 11 | */ 12 | boolean suppressException(String metricName, Exception exc); 13 | } 14 | -------------------------------------------------------------------------------- /prometheus-metrics-instrumentation-dropwizard5/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /prometheus-metrics-instrumentation-guava/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /prometheus-metrics-instrumentation-jvm/src/main/java/io/prometheus/metrics/instrumentation/jvm/NativeImageChecker.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.instrumentation.jvm; 2 | 3 | /** 4 | * Contains utilities to check if we are running inside or building for native image. Default 5 | * behavior is to check if specific for graalvm runtime property is present. For additional 6 | * optimizations it is possible to do add 7 | * "--initialize-at-build-time=io.prometheus.client.hotspot.NativeImageChecker" to graalvm native 8 | * image build command and the native image will be identified during build time. 9 | */ 10 | class NativeImageChecker { 11 | static final boolean isGraalVmNativeImage = 12 | System.getProperty("org.graalvm.nativeimage.imagecode") != null; 13 | 14 | private NativeImageChecker() {} 15 | } 16 | -------------------------------------------------------------------------------- /prometheus-metrics-instrumentation-jvm/src/test/java/io/prometheus/metrics/instrumentation/jvm/ExampleExporterForManualTesting.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.instrumentation.jvm; 2 | 3 | import io.prometheus.metrics.exporter.httpserver.HTTPServer; 4 | import java.io.IOException; 5 | 6 | class ExampleExporterForManualTesting { 7 | 8 | public static void main(String[] args) throws IOException, InterruptedException { 9 | 10 | JvmMetrics.builder().register(); 11 | 12 | HTTPServer server = HTTPServer.builder().port(9400).buildAndStart(); 13 | 14 | System.out.println( 15 | "HTTPServer listening on port http://localhost:" + server.getPort() + "/metrics"); 16 | 17 | while (true) { 18 | Thread.sleep(100); 19 | Runtime.getRuntime().gc(); // Memory allocation metrics only start after GC run. 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /prometheus-metrics-instrumentation-jvm/src/test/java/io/prometheus/metrics/instrumentation/jvm/TestUtil.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.instrumentation.jvm; 2 | 3 | import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter; 4 | import io.prometheus.metrics.model.snapshots.MetricSnapshots; 5 | import java.io.ByteArrayOutputStream; 6 | import java.io.IOException; 7 | import java.nio.charset.StandardCharsets; 8 | 9 | class TestUtil { 10 | 11 | static String convertToOpenMetricsFormat(MetricSnapshots snapshots) throws IOException { 12 | ByteArrayOutputStream out = new ByteArrayOutputStream(); 13 | OpenMetricsTextFormatWriter writer = new OpenMetricsTextFormatWriter(true, true); 14 | writer.write(out, snapshots); 15 | return out.toString(StandardCharsets.UTF_8.name()); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /prometheus-metrics-instrumentation-jvm/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /prometheus-metrics-model/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 4.0.0 6 | 7 | 8 | io.prometheus 9 | client_java 10 | 1.4.0-SNAPSHOT 11 | 12 | 13 | prometheus-metrics-model 14 | bundle 15 | 16 | Prometheus Metrics Model 17 | 18 | Data model for read-only immutable Prometheus metrics snapshots. 19 | 20 | 21 | 22 | io.prometheus.metrics.model 23 | 24 | 25 | -------------------------------------------------------------------------------- /prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/registry/PrometheusScrapeRequest.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.model.registry; 2 | 3 | /** Infos extracted from the request received by the endpoint */ 4 | public interface PrometheusScrapeRequest { 5 | 6 | /** Absolute path of the HTTP request. */ 7 | String getRequestPath(); 8 | 9 | /** See {@code jakarta.servlet.ServletRequest.getParameterValues(String name)} */ 10 | String[] getParameterValues(String name); 11 | } 12 | -------------------------------------------------------------------------------- /prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/DuplicateLabelsException.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.model.snapshots; 2 | 3 | /** 4 | * Thrown when a collector tries to create a {@link MetricSnapshot} where multiple data points have 5 | * the same labels (same label names and label values). 6 | */ 7 | public class DuplicateLabelsException extends IllegalArgumentException { 8 | 9 | private static final long serialVersionUID = 0L; 10 | 11 | private final MetricMetadata metadata; 12 | private final Labels labels; 13 | 14 | public DuplicateLabelsException(MetricMetadata metadata, Labels labels) { 15 | super("Duplicate labels for metric \"" + metadata.getName() + "\": " + labels); 16 | this.metadata = metadata; 17 | this.labels = labels; 18 | } 19 | 20 | public MetricMetadata getMetadata() { 21 | return metadata; 22 | } 23 | 24 | public Labels getLabels() { 25 | return labels; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/NativeHistogramBucket.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.model.snapshots; 2 | 3 | /** For iterating over {@link NativeHistogramBuckets}. */ 4 | public class NativeHistogramBucket { 5 | 6 | private final int bucketIndex; 7 | private final long count; 8 | 9 | public NativeHistogramBucket(int bucketIndex, long count) { 10 | this.bucketIndex = bucketIndex; 11 | this.count = count; 12 | } 13 | 14 | /** See {@link NativeHistogramBuckets} for info on native bucket indexes. */ 15 | public int getBucketIndex() { 16 | return bucketIndex; 17 | } 18 | 19 | public long getCount() { 20 | return count; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /prometheus-metrics-model/src/main/java/io/prometheus/metrics/model/snapshots/Quantile.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.model.snapshots; 2 | 3 | /** Immutable representation of a Quantile. */ 4 | public class Quantile { 5 | 6 | private final double quantile; 7 | private final double value; 8 | 9 | /** 10 | * @param quantile expecting 0.0 <= quantile <= 1.0, otherwise an {@link 11 | * IllegalArgumentException} will be thrown. 12 | * @param value the quantile value 13 | */ 14 | public Quantile(double quantile, double value) { 15 | this.quantile = quantile; 16 | this.value = value; 17 | validate(); 18 | } 19 | 20 | public double getQuantile() { 21 | return quantile; 22 | } 23 | 24 | public double getValue() { 25 | return value; 26 | } 27 | 28 | private void validate() { 29 | if (quantile < 0.0 || quantile > 1.0) { 30 | throw new IllegalArgumentException( 31 | quantile + ": Illegal quantile. Expecting 0 <= quantile <= 1"); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/registry/CollectorTest.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.model.registry; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | 5 | import io.prometheus.metrics.model.snapshots.CounterSnapshot; 6 | import org.junit.jupiter.api.Test; 7 | 8 | class CollectorTest { 9 | 10 | Collector collector = () -> CounterSnapshot.builder().name("counter_a").build(); 11 | 12 | @Test 13 | void predicate() { 14 | PrometheusScrapeRequest request = 15 | new PrometheusScrapeRequest() { 16 | @Override 17 | public String getRequestPath() { 18 | return "/metrics"; 19 | } 20 | 21 | @Override 22 | public String[] getParameterValues(String name) { 23 | return new String[0]; 24 | } 25 | }; 26 | assertThat(collector.collect(name -> false, request)).isNull(); 27 | assertThat(collector.collect(name -> true, request)).isNotNull(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/LabelTest.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.model.snapshots; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | 5 | import org.junit.jupiter.api.Test; 6 | 7 | class LabelTest { 8 | 9 | private static final Label LABEL = new Label("name", "value"); 10 | private static final Label SAME = new Label("name", "value"); 11 | private static final Label LABEL2 = new Label("name", "value2"); 12 | 13 | @Test 14 | void compareTo() { 15 | assertThat(LABEL).isEqualByComparingTo(SAME).isLessThan(LABEL2); 16 | } 17 | 18 | @Test 19 | void testToString() { 20 | assertThat(LABEL).hasToString("Label{name='name', value='value'}"); 21 | } 22 | 23 | @Test 24 | void testEquals() { 25 | assertThat(LABEL).isEqualTo(SAME).isNotEqualTo(LABEL2); 26 | } 27 | 28 | @Test 29 | void testHashCode() { 30 | assertThat(LABEL).hasSameHashCodeAs(SAME).doesNotHaveSameHashCodeAs(LABEL2); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /prometheus-metrics-model/src/test/java/io/prometheus/metrics/model/snapshots/SnapshotTestUtil.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.model.snapshots; 2 | 3 | import static org.assertj.core.api.Assertions.assertThat; 4 | 5 | class SnapshotTestUtil { 6 | 7 | public static void assertMetadata( 8 | MetricSnapshot snapshot, String name, String help, String unit) { 9 | assertThat(snapshot.getMetadata().getName()).isEqualTo(name); 10 | assertThat(snapshot.getMetadata().getHelp()).isEqualTo(help); 11 | if (unit != null) { 12 | assertThat(snapshot.getMetadata().getUnit()).hasToString(unit); 13 | } else { 14 | assertThat(snapshot.getMetadata().getUnit()).isNull(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /prometheus-metrics-model/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /prometheus-metrics-simpleclient-bridge/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | .*(alpha|beta)-[0-9] 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /prometheus-metrics-tracer/prometheus-metrics-tracer-common/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | io.prometheus 8 | prometheus-metrics-tracer 9 | 1.4.0-SNAPSHOT 10 | 11 | 12 | prometheus-metrics-tracer-common 13 | bundle 14 | 15 | Prometheus Metrics Tracer Common 16 | 17 | Common Module for Prometheus integrations with distributed tracing libraries. 18 | 19 | 20 | 21 | io.prometheus.metrics.tracer.common 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /prometheus-metrics-tracer/prometheus-metrics-tracer-common/src/main/java/io/prometheus/metrics/tracer/common/SpanContext.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.metrics.tracer.common; 2 | 3 | public interface SpanContext { 4 | 5 | String EXEMPLAR_ATTRIBUTE_NAME = "exemplar"; 6 | String EXEMPLAR_ATTRIBUTE_VALUE = "true"; 7 | 8 | /** 9 | * @return the current trace id, or {@code null} if this call is not happening within a span 10 | * context. 11 | */ 12 | String getCurrentTraceId(); 13 | 14 | /** 15 | * @return the current span id, or {@code null} if this call is not happening within a span 16 | * context. 17 | */ 18 | String getCurrentSpanId(); 19 | 20 | /** 21 | * @return the state of the current Span. If this value is false a component before in the chain 22 | * take the decision to not record it. Subsequent calling service have to respect this value 23 | * in order not to have partial TraceID with only some Span in it. This value is important to 24 | * be sure to choose a recorded Trace in Examplar sampling process 25 | */ 26 | boolean isCurrentSpanSampled(); 27 | 28 | void markCurrentSpanAsExemplar(); 29 | } 30 | -------------------------------------------------------------------------------- /prometheus-metrics-tracer/prometheus-metrics-tracer-common/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /prometheus-metrics-tracer/prometheus-metrics-tracer-initializer/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /prometheus-metrics-tracer/prometheus-metrics-tracer-otel-agent/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /prometheus-metrics-tracer/prometheus-metrics-tracer-otel/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /prometheus-metrics-tracer/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /scripts/build-release.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | VERSION=${TAG#v} 6 | 7 | ./scripts/set-version.sh "$VERSION" 8 | mvn -B package -P 'release,!default' -Dmaven.test.skip=true 9 | -------------------------------------------------------------------------------- /scripts/set-release-version-github-pages.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euox pipefail 4 | 5 | version=$(git tag -l | grep 'v' | sort | tail -1 | sed 's/v//') 6 | marker="\$version" 7 | sed -i "s/$marker/$version/g" docs/content/getting-started/quickstart.md 8 | -------------------------------------------------------------------------------- /scripts/set-version.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | VERSION=$1 6 | 7 | if [ -z "$VERSION" ]; then 8 | echo "Usage: $0 " 9 | exit 1 10 | fi 11 | 12 | # replace all occurrences '1.4.0-SNAPSHOT' with '$VERSION' 13 | # in all pom.xml files in the current directory and subdirectories 14 | 15 | find . -name 'pom.xml' -exec \ 16 | sed -i "s/1.4.0-SNAPSHOT<\/version>/$VERSION<\/version>/g" {} + 17 | -------------------------------------------------------------------------------- /scripts/super-linter.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | pushd "$(dirname "$0")/.." 6 | 7 | docker pull ghcr.io/super-linter/super-linter:latest 8 | 9 | docker run --rm \ 10 | -e RUN_LOCAL=true \ 11 | -e DEFAULT_BRANCH=main \ 12 | --env-file ".github/super-linter.env" \ 13 | -v "$(pwd)":/tmp/lint \ 14 | ghcr.io/super-linter/super-linter:latest 15 | 16 | popd 17 | -------------------------------------------------------------------------------- /simpleclient-archive/README.md: -------------------------------------------------------------------------------- 1 | # Archived simpleclient modules 2 | 3 | This is not functional source code. We just keep these files around so we don't 4 | lose the GitHub history once we copy them to the new 1.0.x modules. 5 | 6 | If you are looking for the source code for the latest 0.x.x release, see 7 | the [simpleclient](https://github.com/prometheus/client_java/tree/simpleclient) branch. 8 | -------------------------------------------------------------------------------- /simpleclient-archive/integration_tests/it_common/src/test/java/io/prometheus/client/it/common/LogConsumer.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.client.it.common; 2 | 3 | import java.util.function.Consumer; 4 | import org.testcontainers.containers.output.OutputFrame; 5 | 6 | /** Print Docker logs from TestContainers to stdout or stderr. */ 7 | public class LogConsumer implements Consumer { 8 | 9 | private final String prefix; 10 | 11 | private LogConsumer(String prefix) { 12 | this.prefix = prefix; 13 | } 14 | 15 | public static LogConsumer withPrefix(String prefix) { 16 | return new LogConsumer(prefix); 17 | } 18 | 19 | @Override 20 | public void accept(OutputFrame outputFrame) { 21 | switch (outputFrame.getType()) { 22 | case STDOUT: 23 | System.out.print(prefix + " - " + outputFrame.getUtf8String()); 24 | break; 25 | case END: 26 | System.out.println(prefix + " - END"); 27 | break; 28 | default: // STDERR or unexpected 29 | System.err.print(prefix + " - " + outputFrame.getUtf8String()); 30 | break; 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /simpleclient-archive/integration_tests/it_common/src/test/java/io/prometheus/client/it/common/Version.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.client.it.common; 2 | 3 | import java.io.IOException; 4 | import java.util.Properties; 5 | 6 | /** Utility to get the project version, like 0.12.1-SNAPSHOT */ 7 | public class Version { 8 | 9 | public static String loadProjectVersion() throws IOException { 10 | Properties properties = new Properties(); 11 | properties.load(Volume.class.getResourceAsStream("/project_version.properties")); 12 | return properties.getProperty("project.version"); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /simpleclient-archive/integration_tests/it_common/src/test/resources/project_version.properties: -------------------------------------------------------------------------------- 1 | # ${project.version} will be replaced by Maven at built time 2 | # when this file is copied to the target/ directory. 3 | project.version=${project.version} 4 | -------------------------------------------------------------------------------- /simpleclient-archive/integration_tests/it_common/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /simpleclient-archive/integration_tests/it_exemplars_otel_agent/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /simpleclient-archive/integration_tests/it_exemplars_otel_agent/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /simpleclient-archive/integration_tests/it_exemplars_otel_agent/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | .*alpha.* 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /simpleclient-archive/integration_tests/it_exemplars_otel_sdk/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /simpleclient-archive/integration_tests/it_exemplars_otel_sdk/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /simpleclient-archive/integration_tests/it_java_versions/src/main/java/io/prometheus/client/it/java_versions/ExampleApplication.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.client.it.java_versions; 2 | 3 | import io.prometheus.client.Counter; 4 | import io.prometheus.client.exporter.HTTPServer; 5 | import io.prometheus.client.hotspot.DefaultExports; 6 | import java.io.IOException; 7 | 8 | /** Simple example application that compiles with Java 6. */ 9 | public class ExampleApplication { 10 | 11 | public static void main(String[] args) throws IOException, InterruptedException { 12 | DefaultExports.initialize(); 13 | Counter counter = 14 | Counter.build().name("test").help("test counter").labelNames("path").register(); 15 | counter.labels("/hello-world").inc(); 16 | new HTTPServer(9000); 17 | Thread.currentThread().join(); // sleep forever 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /simpleclient-archive/integration_tests/it_java_versions/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /simpleclient-archive/integration_tests/it_java_versions/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /simpleclient-archive/integration_tests/it_log4j2/src/main/java/io/prometheus/client/it/log4j2/ExampleApplication.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.client.it.log4j2; 2 | 3 | import io.prometheus.client.exporter.HTTPServer; 4 | import java.io.IOException; 5 | import org.apache.logging.log4j.LogManager; 6 | import org.apache.logging.log4j.Logger; 7 | 8 | /** Simple example application using simpleclient_log4j2. */ 9 | public class ExampleApplication { 10 | 11 | private static final Logger logger = LogManager.getLogger(ExampleApplication.class); 12 | 13 | public static void main(String[] args) throws IOException, InterruptedException { 14 | 15 | logger.debug("some debug message"); 16 | logger.debug("another debug message"); 17 | logger.warn("this is a warning"); 18 | 19 | new HTTPServer(9000); 20 | Thread.currentThread().join(); // sleep forever 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /simpleclient-archive/integration_tests/it_log4j2/src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /simpleclient-archive/integration_tests/it_log4j2/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /simpleclient-archive/integration_tests/it_log4j2/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /simpleclient-archive/integration_tests/it_pushgateway/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /simpleclient-archive/integration_tests/it_pushgateway/src/test/resources/web-config.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Usernames and passwords required to connect. 3 | # Passwords are hashed with bcrypt: 4 | # https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md#about-bcrypt. 5 | basic_auth_users: 6 | # testUser: testPwd 7 | testUser: $2y$10$r/SV/hDe3E3ISKsrZIwVJe40vrCo5N8e22WbxDCThMIhaYdUgCBwe 8 | -------------------------------------------------------------------------------- /simpleclient-archive/integration_tests/it_pushgateway/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | .*alpha.* 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /simpleclient-archive/integration_tests/it_servlet_jakarta_exporter_webxml/src/main/java/io/prometheus/client/it/servlet/jakarta/ExampleServlet.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.client.it.servlet.jakarta; 2 | 3 | import io.prometheus.client.hotspot.DefaultExports; 4 | import jakarta.servlet.http.HttpServlet; 5 | import jakarta.servlet.http.HttpServletRequest; 6 | import jakarta.servlet.http.HttpServletResponse; 7 | import java.io.BufferedWriter; 8 | import java.io.IOException; 9 | import java.io.Writer; 10 | 11 | public class ExampleServlet extends HttpServlet { 12 | 13 | @Override 14 | public void init() { 15 | DefaultExports.initialize(); 16 | } 17 | 18 | @Override 19 | protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) 20 | throws IOException { 21 | resp.setStatus(200); 22 | resp.setContentType("text/plain"); 23 | Writer writer = new BufferedWriter(resp.getWriter()); 24 | writer.write("Hello, world!\n"); 25 | writer.close(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /simpleclient-archive/integration_tests/it_servlet_jakarta_exporter_webxml/src/test/resources/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM jetty:11.0.6 2 | COPY servlet_jakarta_exporter_webxml.war /var/lib/jetty/webapps/ROOT.war 3 | -------------------------------------------------------------------------------- /simpleclient-archive/integration_tests/it_servlet_jakarta_exporter_webxml/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /simpleclient-archive/integration_tests/it_servlet_jakarta_exporter_webxml/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | .*alpha.* 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /simpleclient-archive/integration_tests/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | .*alpha.* 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_graphite_bridge/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | io.prometheus 8 | client_java 9 | 1.0.0-beta-2-SNAPSHOT 10 | 11 | 12 | simpleclient_graphite_bridge 13 | bundle 14 | 15 | Prometheus Java Simpleclient Graphite Bridge 16 | 17 | Graphite bridge for the simpleclient. 18 | 19 | 20 | 21 | 22 | io.prometheus 23 | simpleclient 24 | ${project.version} 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_graphite_bridge/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_hibernate/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_httpserver/src/main/java/io/prometheus/client/exporter/SampleNameFilterSupplier.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.client.exporter; 2 | 3 | import io.prometheus.client.Predicate; 4 | import io.prometheus.client.Supplier; 5 | 6 | /** 7 | * For convenience, an implementation of a {@code Supplier>} that always returns 8 | * the same sampleNameFilter. 9 | */ 10 | public class SampleNameFilterSupplier implements Supplier> { 11 | 12 | private final Predicate sampleNameFilter; 13 | 14 | public static SampleNameFilterSupplier of(Predicate sampleNameFilter) { 15 | return new SampleNameFilterSupplier(sampleNameFilter); 16 | } 17 | 18 | private SampleNameFilterSupplier(Predicate sampleNameFilter) { 19 | this.sampleNameFilter = sampleNameFilter; 20 | } 21 | 22 | @Override 23 | public Predicate get() { 24 | return sampleNameFilter; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_httpserver/src/test/java/io/prometheus/client/exporter/ExampleExporter.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.client.exporter; 2 | 3 | import io.prometheus.client.Counter; 4 | import io.prometheus.client.Gauge; 5 | import io.prometheus.client.Histogram; 6 | import io.prometheus.client.Summary; 7 | 8 | public class ExampleExporter { 9 | 10 | static final Gauge g = Gauge.build().name("gauge").help("blah").register(); 11 | static final Counter c = Counter.build().name("counter").help("meh").register(); 12 | static final Summary s = Summary.build().name("summary").help("meh").register(); 13 | static final Histogram h = Histogram.build().name("histogram").help("meh").register(); 14 | static final Gauge l = Gauge.build().name("labels").help("blah").labelNames("l").register(); 15 | 16 | public static void main(String[] args) throws Exception { 17 | new HTTPServer(1234); 18 | g.set(1); 19 | c.inc(2); 20 | s.observe(3); 21 | h.observe(4); 22 | l.labels("foo").inc(5); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_httpserver/src/test/resources/keystore.pkcs12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/prometheus/client_java/b1ff4701a5c268f742dfc440308ea888b88e3ceb/simpleclient-archive/simpleclient_httpserver/src/test/resources/keystore.pkcs12 -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_httpserver/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_jetty/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_jetty_jdk8/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_log4j/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_log4j2/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | io.prometheus 8 | client_java 9 | 1.0.0-beta-2-SNAPSHOT 10 | 11 | 12 | simpleclient_log4j2 13 | bundle 14 | 15 | Prometheus Java Simpleclient log4j2 16 | 17 | Metrics collector for log4j2 appender logging 18 | 19 | 20 | 21 | 22 | io.prometheus 23 | simpleclient 24 | ${project.version} 25 | 26 | 27 | org.apache.logging.log4j 28 | log4j-core 29 | 2.17.2 30 | provided 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_log4j2/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_logback/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | 7 | io.prometheus 8 | client_java 9 | 1.0.0-beta-2-SNAPSHOT 10 | 11 | 12 | simpleclient_logback 13 | bundle 14 | 15 | Prometheus Java Simpleclient logback 16 | 17 | Metrics collector for logback appender logging 18 | 19 | 20 | 21 | 22 | io.prometheus 23 | simpleclient 24 | ${project.version} 25 | 26 | 27 | ch.qos.logback 28 | logback-classic 29 | 1.2.11 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_logback/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | .*alpha.* 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_servlet/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | [^8].* 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_servlet_common/src/main/java/io/prometheus/client/servlet/common/adapter/FilterConfigAdapter.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.client.servlet.common.adapter; 2 | 3 | public interface FilterConfigAdapter { 4 | String getInitParameter(String name); 5 | } 6 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_servlet_common/src/main/java/io/prometheus/client/servlet/common/adapter/HttpServletRequestAdapter.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.client.servlet.common.adapter; 2 | 3 | public interface HttpServletRequestAdapter { 4 | String getHeader(String name); 5 | 6 | String getRequestURI(); 7 | 8 | String getMethod(); 9 | 10 | String[] getParameterValues(String name); 11 | 12 | String getContextPath(); 13 | } 14 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_servlet_common/src/main/java/io/prometheus/client/servlet/common/adapter/HttpServletResponseAdapter.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.client.servlet.common.adapter; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | 6 | public interface HttpServletResponseAdapter { 7 | int getStatus(); 8 | 9 | void setStatus(int httpStatusCode); 10 | 11 | void setContentType(String contentType); 12 | 13 | PrintWriter getWriter() throws IOException; 14 | } 15 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_servlet_common/src/main/java/io/prometheus/client/servlet/common/adapter/ServletConfigAdapter.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.client.servlet.common.adapter; 2 | 3 | public interface ServletConfigAdapter { 4 | String getInitParameter(String name); 5 | } 6 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_servlet_common/src/main/java/io/prometheus/client/servlet/common/exporter/ServletConfigurationException.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.client.servlet.common.exporter; 2 | 3 | public class ServletConfigurationException extends Exception {} 4 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_servlet_common/src/main/java/io/prometheus/client/servlet/common/filter/FilterConfigurationException.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.client.servlet.common.filter; 2 | 3 | /** Thrown when there is a misconfiguration in {@code web.xml}. */ 4 | public class FilterConfigurationException extends Exception { 5 | public FilterConfigurationException(String msg) { 6 | super(msg); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_servlet_common/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_servlet_jakarta/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_spring_web/src/main/java/io/prometheus/client/spring/web/EnablePrometheusTiming.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.client.spring.web; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | import org.springframework.context.annotation.Import; 9 | 10 | /** 11 | * Enable the use of {@link PrometheusTimeMethod} annotation on classes or methods. 12 | * 13 | *

Usage: Add this annotation to any Spring {@link 14 | * org.springframework.context.annotation.Configuration} class to enable the use of the {@link 15 | * PrometheusTimeMethod} annotation. 16 | * 17 | *

* 18 | * 19 | *


20 |  * {@literal @}Configuration
21 |  * {@literal @}EnablePrometheusEndpoint
22 |  * {@literal @}EnablePrometheusTiming
23 |  *  public class MyAppConfig {
24 |  *    // Other configuration items...
25 |  *  }
26 |  * 
27 | * 28 | * @author Andrew Stuart 29 | */ 30 | @Retention(RetentionPolicy.RUNTIME) 31 | @Target(ElementType.TYPE) 32 | @Import(MethodTimer.class) 33 | @Documented 34 | public @interface EnablePrometheusTiming {} 35 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_spring_web/src/test/java/io/prometheus/client/spring/web/MethodTimerAppTest.java: -------------------------------------------------------------------------------- 1 | package io.prometheus.client.spring.web; 2 | 3 | import static org.junit.Assert.*; 4 | 5 | import org.springframework.stereotype.Controller; 6 | import org.springframework.test.context.ContextConfiguration; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | 9 | @ContextConfiguration 10 | @EnablePrometheusTiming 11 | class MethodTimerAppTest { 12 | 13 | @Controller 14 | public static class MyController { 15 | @RequestMapping("/") 16 | @PrometheusTimeMethod(name = "prom_time_seconds", help = "time") 17 | public void waitJustAGoshDarnSecond() throws Exception { 18 | Thread.sleep(1000); 19 | } 20 | } 21 | 22 | public static class MyConfig {} 23 | } 24 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_spring_web/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | [^4].* 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_vertx/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | [^3].* 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /simpleclient-archive/simpleclient_vertx4/version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /version-rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | --------------------------------------------------------------------------------