Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: prometheus/client_model
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.4.0
Choose a base ref
...
head repository: prometheus/client_model
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.6.1
Choose a head ref

Commits on Jul 4, 2023

  1. Update common Prometheus files

    Signed-off-by: prombot <prometheus-team@googlegroups.com>
    prombot committed Jul 4, 2023
    Copy the full SHA
    0e6fdca View commit details

Commits on Jul 11, 2023

  1. Merge pull request #65 from prometheus/repo_sync

    Synchronize common files from prometheus/prometheus
    beorn7 authored Jul 11, 2023
    Copy the full SHA
    2b34b1e View commit details

Commits on Jul 18, 2023

  1. (feat): Add created timestamps to counter, summary and histogram

    Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
    Arthur Silva Sens committed Jul 18, 2023
    Copy the full SHA
    9a2bf30 View commit details

Commits on Jul 19, 2023

  1. Merge pull request #66 from ArthurSens/created-timestamp

    (feat): Add created timestamps to counter, summary and histogram
    beorn7 authored Jul 19, 2023
    Copy the full SHA
    95a0733 View commit details

Commits on Jul 20, 2023

  1. histogram: Add a doc comment about when to add a no-op span

    See prometheus/client_golang#1127 for details.
    
    Signed-off-by: beorn7 <beorn@grafana.com>
    beorn7 committed Jul 20, 2023
    Copy the full SHA
    2a367b9 View commit details

Commits on Jul 26, 2023

  1. Merge pull request #67 from prometheus/beorn7/histogram

    histogram: Add a doc comment about when to add a no-op span
    beorn7 authored Jul 26, 2023
    Copy the full SHA
    cfbcccb View commit details

Commits on Sep 1, 2023

  1. Update common Prometheus files

    Signed-off-by: prombot <prometheus-team@googlegroups.com>
    prombot committed Sep 1, 2023
    Copy the full SHA
    4dbcf4e View commit details

Commits on Sep 5, 2023

  1. Merge pull request #69 from prometheus/repo_sync

    Synchronize common files from prometheus/prometheus
    beorn7 authored Sep 5, 2023
    Copy the full SHA
    7b38251 View commit details

Commits on Sep 14, 2023

  1. Update common Prometheus files

    Signed-off-by: prombot <prometheus-team@googlegroups.com>
    prombot committed Sep 14, 2023
    Copy the full SHA
    185bafb View commit details

Commits on Sep 19, 2023

  1. Merge pull request #70 from prometheus/repo_sync

    Synchronize common files from prometheus/prometheus
    beorn7 authored Sep 19, 2023
    Copy the full SHA
    baaa038 View commit details

Commits on Oct 2, 2023

  1. Update Go

    * Enable dependabot monthly updates.
    * Update Go minimum to 1.19.
    * Update Go modules.
    
    Signed-off-by: SuperQ <superq@gmail.com>
    SuperQ committed Oct 2, 2023
    Copy the full SHA
    568c466 View commit details
  2. Copy the full SHA
    cbe84de View commit details
  3. Update common Prometheus files

    Signed-off-by: prombot <prometheus-team@googlegroups.com>
    prombot committed Oct 2, 2023
    Copy the full SHA
    58db340 View commit details

Commits on Oct 3, 2023

  1. Merge pull request #72 from prometheus/repo_sync

    Synchronize common files from prometheus/prometheus
    beorn7 authored Oct 3, 2023
    Copy the full SHA
    1c92cad View commit details

Commits on Nov 3, 2023

  1. Update common Prometheus files

    Signed-off-by: prombot <prometheus-team@googlegroups.com>
    prombot committed Nov 3, 2023
    Copy the full SHA
    fc673f1 View commit details

Commits on Nov 8, 2023

  1. Merge pull request #73 from prometheus/repo_sync

    Synchronize common files from prometheus/prometheus
    beorn7 authored Nov 8, 2023
    Copy the full SHA
    f095bcd View commit details

Commits on Nov 18, 2023

  1. Update common Prometheus files

    Signed-off-by: prombot <prometheus-team@googlegroups.com>
    prombot committed Nov 18, 2023
    Copy the full SHA
    2ba4e15 View commit details

Commits on Nov 21, 2023

  1. Merge pull request #74 from prometheus/repo_sync

    Synchronize common files from prometheus/prometheus
    beorn7 authored Nov 21, 2023
    Copy the full SHA
    62658f5 View commit details

Commits on Dec 2, 2023

  1. Add unit field to MetricFamily proto message

    Signed-off-by: Arianna Vespri <arianna.vespri@yahoo.it>
    vesari committed Dec 2, 2023
    Copy the full SHA
    003f160 View commit details

Commits on Dec 5, 2023

  1. Merge pull request #75 from vesari/add-unit

    Add unit field to MetricFamily proto message
    beorn7 authored Dec 5, 2023
    Copy the full SHA
    c26a8ee View commit details

Commits on Dec 11, 2023

  1. Update common Prometheus files

    Signed-off-by: prombot <prometheus-team@googlegroups.com>
    prombot committed Dec 11, 2023
    Copy the full SHA
    734da88 View commit details

Commits on Dec 12, 2023

  1. Merge pull request #76 from prometheus/repo_sync

    Synchronize common files from prometheus/prometheus
    beorn7 authored Dec 12, 2023
    Copy the full SHA
    9b7b675 View commit details

Commits on Dec 18, 2023

  1. Update common Prometheus files

    Signed-off-by: prombot <prometheus-team@googlegroups.com>
    prombot committed Dec 18, 2023
    Copy the full SHA
    d150866 View commit details

Commits on Dec 25, 2023

  1. Merge pull request #77 from prometheus/repo_sync

    Synchronize common files from prometheus/prometheus
    beorn7 authored Dec 25, 2023
    Copy the full SHA
    93dfe21 View commit details

Commits on Jan 1, 2024

  1. Bump google.golang.org/protobuf from 1.31.0 to 1.32.0

    Bumps google.golang.org/protobuf from 1.31.0 to 1.32.0.
    
    ---
    updated-dependencies:
    - dependency-name: google.golang.org/protobuf
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jan 1, 2024
    Copy the full SHA
    2aad054 View commit details

Commits on Jan 6, 2024

  1. Merge pull request #78 from prometheus/dependabot/go_modules/google.g…

    …olang.org/protobuf-1.32.0
    
    Bump google.golang.org/protobuf from 1.31.0 to 1.32.0
    beorn7 authored Jan 6, 2024
    Copy the full SHA
    f68ef47 View commit details

Commits on Jan 8, 2024

  1. Update common Prometheus files

    Signed-off-by: prombot <prometheus-team@googlegroups.com>
    prombot committed Jan 8, 2024
    Copy the full SHA
    552c44f View commit details

Commits on Jan 10, 2024

  1. Merge pull request #79 from prometheus/repo_sync

    Synchronize common files from prometheus/prometheus
    beorn7 authored Jan 10, 2024
    Copy the full SHA
    f22bbab View commit details

Commits on Jan 23, 2024

  1. add exemplar to native histogram (#80)

    Add exemplars to native histogram
    
    Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
    fatsheep9146 authored Jan 23, 2024
    Copy the full SHA
    d56cd79 View commit details

Commits on Feb 26, 2024

  1. Update common Prometheus files

    Signed-off-by: prombot <prometheus-team@googlegroups.com>
    prombot committed Feb 26, 2024
    Copy the full SHA
    ccd6823 View commit details

Commits on Feb 28, 2024

  1. Merge pull request #81 from prometheus/repo_sync

    Synchronize common files from prometheus/prometheus
    SuperQ authored Feb 28, 2024
    Copy the full SHA
    01ca24c View commit details

Commits on Mar 4, 2024

  1. Update common Prometheus files

    Signed-off-by: prombot <prometheus-team@googlegroups.com>
    prombot committed Mar 4, 2024
    Copy the full SHA
    bb45f95 View commit details

Commits on Mar 6, 2024

  1. Merge pull request #82 from prometheus/repo_sync

    Synchronize common files from prometheus/prometheus
    beorn7 authored Mar 6, 2024
    Copy the full SHA
    5c25993 View commit details

Commits on Mar 13, 2024

  1. Bump google.golang.org/protobuf from 1.32.0 to 1.33.0

    Bumps google.golang.org/protobuf from 1.32.0 to 1.33.0.
    
    ---
    updated-dependencies:
    - dependency-name: google.golang.org/protobuf
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Mar 13, 2024
    Copy the full SHA
    d954a8a View commit details

Commits on Mar 19, 2024

  1. Merge pull request #84 from prometheus/dependabot/go_modules/google.g…

    …olang.org/protobuf-1.33.0
    
    Bump google.golang.org/protobuf from 1.32.0 to 1.33.0
    beorn7 authored Mar 19, 2024
    Copy the full SHA
    64c33c9 View commit details

Commits on Mar 20, 2024

  1. Update common Prometheus files

    Signed-off-by: prombot <prometheus-team@googlegroups.com>
    prombot committed Mar 20, 2024
    Copy the full SHA
    bce87c1 View commit details

Commits on Mar 21, 2024

  1. Merge pull request #85 from prometheus/repo_sync

    Synchronize common files from prometheus/prometheus
    beorn7 authored Mar 21, 2024
    Copy the full SHA
    6fe5007 View commit details

Commits on Mar 22, 2024

  1. Update common Prometheus files

    Signed-off-by: prombot <prometheus-team@googlegroups.com>
    prombot committed Mar 22, 2024
    Copy the full SHA
    cc727ab View commit details

Commits on Mar 26, 2024

  1. Merge pull request #86 from prometheus/repo_sync

    Synchronize common files from prometheus/prometheus
    beorn7 authored Mar 26, 2024
    Copy the full SHA
    571429e View commit details
Showing with 263 additions and 165 deletions.
  1. +14 −0 .github/dependabot.yml
  2. +13 −5 .github/workflows/golangci-lint.yml
  3. +2 −2 go.mod
  4. +2 −6 go.sum
  5. +219 −152 go/metrics.pb.go
  6. +13 −0 io/prometheus/client/metrics.proto
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "gomod"
directory: "/examples/middleware"
schedule:
interval: "monthly"
- package-ecosystem: "gomod"
directory: "/tutorial/whatsup"
schedule:
interval: "monthly"
18 changes: 13 additions & 5 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---
# This action is synced from https://github.com/prometheus/prometheus
name: golangci-lint
on:
push:
@@ -10,21 +12,27 @@ on:
- ".golangci.yml"
pull_request:

permissions: # added using https://github.com/step-security/secure-repo
contents: read

jobs:
golangci:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
name: lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: install Go
uses: actions/setup-go@v3
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: 1.20.x
go-version: 1.22.x
- name: Install snmp_exporter/generator dependencies
run: sudo apt-get update && sudo apt-get -y install libsnmp-dev
if: github.repository == 'prometheus/snmp_exporter'
- name: Lint
uses: golangci/golangci-lint-action@v3.4.0
uses: golangci/golangci-lint-action@3cfe3a4abbb849e10058ce4af15d205b6da42804 # v4.0.0
with:
version: v1.51.2
version: v1.56.2
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/prometheus/client_model

go 1.18
go 1.19

require google.golang.org/protobuf v1.30.0
require google.golang.org/protobuf v1.33.0
8 changes: 2 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
371 changes: 219 additions & 152 deletions go/metrics.pb.go

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions io/prometheus/client/metrics.proto
Original file line number Diff line number Diff line change
@@ -46,6 +46,8 @@ message Gauge {
message Counter {
optional double value = 1;
optional Exemplar exemplar = 2;

optional google.protobuf.Timestamp created_timestamp = 3;
}

message Quantile {
@@ -57,6 +59,8 @@ message Summary {
optional uint64 sample_count = 1;
optional double sample_sum = 2;
repeated Quantile quantile = 3;

optional google.protobuf.Timestamp created_timestamp = 4;
}

message Untyped {
@@ -70,6 +74,8 @@ message Histogram {
// Buckets for the conventional histogram.
repeated Bucket bucket = 3; // Ordered in increasing order of upper_bound, +Inf bucket is optional.

optional google.protobuf.Timestamp created_timestamp = 15;

// Everything below here is for native histograms (also known as sparse histograms).
// Native histograms are an experimental feature without stability guarantees.

@@ -92,12 +98,18 @@ message Histogram {
repeated double negative_count = 11; // Absolute count of each bucket.

// Positive buckets for the native histogram.
// Use a no-op span (offset 0, length 0) for a native histogram without any
// observations yet and with a zero_threshold of 0. Otherwise, it would be
// indistinguishable from a classic histogram.
repeated BucketSpan positive_span = 12;
// Use either "positive_delta" or "positive_count", the former for
// regular histograms with integer counts, the latter for float
// histograms.
repeated sint64 positive_delta = 13; // Count delta of each bucket compared to previous one (or to zero for 1st bucket).
repeated double positive_count = 14; // Absolute count of each bucket.

// Only used for native histograms. These exemplars MUST have a timestamp.
repeated Exemplar exemplars = 16;
}

// A Bucket of a conventional histogram, each of which is treated as
@@ -141,4 +153,5 @@ message MetricFamily {
optional string help = 2;
optional MetricType type = 3;
repeated Metric metric = 4;
optional string unit = 5;
}