Skip to content

Commit

Permalink
Merge pull request #278 from prometheus/superq/bump_build
Browse files Browse the repository at this point in the history
Release v0.16.0
  • Loading branch information
SuperQ authored Oct 29, 2024
2 parents 22beb8a + c2da403 commit 27e7320
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ executors:
# Whenever the Go version is updated here, .promu.yml should also be updated.
golang:
docker:
- image: cimg/go:1.22
- image: cimg/go:1.23
jobs:
test:
executor: golang
Expand Down
3 changes: 1 addition & 2 deletions .promu.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
go:
# Whenever the Go version is updated here, .travis.yml and
# .circle/config.yml should also be updated.
version: 1.22
version: 1.23
repository:
path: github.com/prometheus/graphite_exporter
build:
Expand All @@ -10,7 +10,6 @@ build:
path: ./cmd/graphite_exporter
- name: getool
path: ./cmd/getool
flags: -a -tags netgo
ldflags: |
-X github.com/prometheus/common/version.Version={{.Version}}
-X github.com/prometheus/common/version.Revision={{.Revision}}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.16.0 / 2024-10-29

* [CHANGE] Replace logging with Go slog library #277

## 0.15.2 / 2024-03-22

* [SECURITY] Update Go to 1.22, update dependencies
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.15.2
0.16.0
32 changes: 19 additions & 13 deletions cmd/graphite_exporter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,20 +161,26 @@ func main() {
}
}()

http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path != "/" {
http.NotFound(w, r)
return
if *metricsPath != "/" {
landingConfig := web.LandingConfig{
Name: "Graphite Exporter",
Description: "Prometheus Graphite Exporter",
ExtraHTML: `<p>Accepting plaintext Graphite samples over TCP and UDP on ` + *graphiteAddress + `</p>`,
Version: version.Info(),
Links: []web.LandingLinks{
{
Address: *metricsPath,
Text: "Metrics",
},
},
}
w.Write([]byte(`<html>
<head><title>Graphite Exporter</title></head>
<body>
<h1>Graphite Exporter</h1>
<p>Accepting plaintext Graphite samples over TCP and UDP on ` + *graphiteAddress + `</p>
<p><a href="` + *metricsPath + `">Metrics</a></p>
</body>
</html>`))
})
landingPage, err := web.NewLandingPage(landingConfig)
if err != nil {
logger.Error(err.Error())
os.Exit(1)
}
http.Handle("/", landingPage)
}

server := &http.Server{}
if err := web.ListenAndServe(server, toolkitFlags, logger); err != nil {
Expand Down

0 comments on commit 27e7320

Please sign in to comment.