Skip to content

build(deps): bump github.com/prometheus/common from 0.34.0 to 0.40.0 in /documentation/examples/remote_storage #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b0b1be4
replace tsdb with frostdb
thorfour Jun 24, 2022
fbbfc62
fix panics
thorfour Jun 24, 2022
644ab02
query stuffs
thorfour Jun 24, 2022
552c1af
slog
thorfour Jun 24, 2022
09cf7c5
add dyn column name to matchers
thorfour Jun 24, 2022
40f5317
unit test
thorfour Jun 25, 2022
559a62d
unit test
thorfour Jun 25, 2022
a5b1475
fixing things
thorfour Jun 25, 2022
dd7e645
rewrite of iteration
thorfour Jun 25, 2022
7d91256
fix trim prefix
thorfour Jun 25, 2022
cf5b560
label names/values
thorfour Jun 25, 2022
95fad2c
error handling
thorfour Jun 25, 2022
3440d2e
fix for label names/values
thorfour Jun 25, 2022
a8fdd0f
unit test
thorfour Jun 25, 2022
ad4942f
fix flattening
thorfour Jun 25, 2022
c8b3f84
merge func
thorfour Jun 25, 2022
2ddfdff
fixes
thorfour Jun 25, 2022
47d757c
use query engine for queries
thorfour Jul 1, 2022
6ce7020
removed seriessets from records
thorfour Jul 1, 2022
46bafc9
fixed parsing
thorfour Jul 1, 2022
20688a4
Use Distinct instead of Project
thorfour Jul 17, 2022
f885858
go mod
thorfour Jul 17, 2022
f532992
use schema scan for label names
thorfour Jul 17, 2022
2608fce
use label name in distinct query
thorfour Jul 19, 2022
07faba7
frostdb: Simplify queries to be more compact
brancz Jul 19, 2022
5458658
frostdb: Fix label names query
brancz Jul 19, 2022
0357818
Integrate newer FrostDB with WAL support
arajkumar Aug 12, 2022
62d5aef
Merge pull request #25 from arajkumar/frostdb-with-wal
thorfour Aug 12, 2022
07f7517
Close frostdb during prometheus shutdown
arajkumar Aug 16, 2022
94b8b71
Use localstorage bucket for persistence
arajkumar Aug 16, 2022
f9cfeaf
Merge pull request #27 from arajkumar/close-frostdb
thorfour Aug 23, 2022
e36cefe
build(deps): bump github.com/prometheus/common
dependabot[bot] Mar 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 12 additions & 28 deletions cmd/prometheus/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import (
"github.com/prometheus/prometheus/discovery"
"github.com/prometheus/prometheus/discovery/legacymanager"
"github.com/prometheus/prometheus/discovery/targetgroup"
"github.com/prometheus/prometheus/frostdb"
"github.com/prometheus/prometheus/model/exemplar"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/model/relabel"
Expand Down Expand Up @@ -1115,38 +1116,21 @@ func main() {
level.Info(logger).Log("msg", "See you next time!")
}

func openDBWithMetrics(dir string, logger log.Logger, reg prometheus.Registerer, opts *tsdb.Options, stats *tsdb.DBStats) (*tsdb.DB, error) {
db, err := tsdb.Open(
dir,
log.With(logger, "component", "tsdb"),
reg,
opts,
stats,
)
func openDBWithMetrics(dir string, logger log.Logger, reg prometheus.Registerer, opts *tsdb.Options, stats *tsdb.DBStats) (storage.Storage, error) {
db, err := frostdb.Open(dir, reg, log.With(logger, "component", "frostdb"))
/*
db, err := tsdb.Open(
dir,
log.With(logger, "component", "tsdb"),
reg,
opts,
stats,
)
*/
if err != nil {
return nil, err
}

reg.MustRegister(
prometheus.NewGaugeFunc(prometheus.GaugeOpts{
Name: "prometheus_tsdb_lowest_timestamp_seconds",
Help: "Lowest timestamp value stored in the database.",
}, func() float64 {
bb := db.Blocks()
if len(bb) == 0 {
return float64(db.Head().MinTime() / 1000)
}
return float64(db.Blocks()[0].Meta().MinTime / 1000)
}), prometheus.NewGaugeFunc(prometheus.GaugeOpts{
Name: "prometheus_tsdb_head_min_time_seconds",
Help: "Minimum time bound of the head block.",
}, func() float64 { return float64(db.Head().MinTime() / 1000) }),
prometheus.NewGaugeFunc(prometheus.GaugeOpts{
Name: "prometheus_tsdb_head_max_time_seconds",
Help: "Maximum timestamp of the head block.",
}, func() float64 { return float64(db.Head().MaxTime() / 1000) }),
)

return db, nil
}

Expand Down
25 changes: 14 additions & 11 deletions documentation/examples/remote_storage/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ require (
github.com/gogo/protobuf v1.3.2
github.com/golang/snappy v0.0.4
github.com/influxdata/influxdb v1.9.5
github.com/prometheus/client_golang v1.12.2
github.com/prometheus/common v0.34.0
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/common v0.40.0
github.com/prometheus/prometheus v1.8.2-0.20220202104425-d819219dd438
github.com/stretchr/testify v1.7.2
github.com/stretchr/testify v1.8.0
gopkg.in/alecthomas/kingpin.v2 v2.2.6
)

Expand All @@ -27,27 +27,30 @@ require (
github.com/golang/protobuf v1.5.2 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jpillora/backoff v1.0.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common/sigv4 v0.1.0 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.26.1 // indirect
go.opentelemetry.io/otel v1.2.0 // indirect
go.opentelemetry.io/otel/internal/metric v0.24.0 // indirect
go.opentelemetry.io/otel/metric v0.24.0 // indirect
go.opentelemetry.io/otel/trace v1.2.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/goleak v1.1.12 // indirect
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/net v0.4.0 // indirect
golang.org/x/oauth2 v0.3.0 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.27.1 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading