Skip to content

Commit 27e7320

Browse files
authored
Merge pull request #278 from prometheus/superq/bump_build
Release v0.16.0
2 parents 22beb8a + c2da403 commit 27e7320

File tree

5 files changed

+26
-17
lines changed

5 files changed

+26
-17
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ executors:
55
# Whenever the Go version is updated here, .promu.yml should also be updated.
66
golang:
77
docker:
8-
- image: cimg/go:1.22
8+
- image: cimg/go:1.23
99
jobs:
1010
test:
1111
executor: golang

.promu.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
go:
22
# Whenever the Go version is updated here, .travis.yml and
33
# .circle/config.yml should also be updated.
4-
version: 1.22
4+
version: 1.23
55
repository:
66
path: github.com/prometheus/graphite_exporter
77
build:
@@ -10,7 +10,6 @@ build:
1010
path: ./cmd/graphite_exporter
1111
- name: getool
1212
path: ./cmd/getool
13-
flags: -a -tags netgo
1413
ldflags: |
1514
-X github.com/prometheus/common/version.Version={{.Version}}
1615
-X github.com/prometheus/common/version.Revision={{.Revision}}

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.16.0 / 2024-10-29
2+
3+
* [CHANGE] Replace logging with Go slog library #277
4+
15
## 0.15.2 / 2024-03-22
26

37
* [SECURITY] Update Go to 1.22, update dependencies

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.15.2
1+
0.16.0

cmd/graphite_exporter/main.go

+19-13
Original file line numberDiff line numberDiff line change
@@ -161,20 +161,26 @@ func main() {
161161
}
162162
}()
163163

164-
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
165-
if r.URL.Path != "/" {
166-
http.NotFound(w, r)
167-
return
164+
if *metricsPath != "/" {
165+
landingConfig := web.LandingConfig{
166+
Name: "Graphite Exporter",
167+
Description: "Prometheus Graphite Exporter",
168+
ExtraHTML: `<p>Accepting plaintext Graphite samples over TCP and UDP on ` + *graphiteAddress + `</p>`,
169+
Version: version.Info(),
170+
Links: []web.LandingLinks{
171+
{
172+
Address: *metricsPath,
173+
Text: "Metrics",
174+
},
175+
},
168176
}
169-
w.Write([]byte(`<html>
170-
<head><title>Graphite Exporter</title></head>
171-
<body>
172-
<h1>Graphite Exporter</h1>
173-
<p>Accepting plaintext Graphite samples over TCP and UDP on ` + *graphiteAddress + `</p>
174-
<p><a href="` + *metricsPath + `">Metrics</a></p>
175-
</body>
176-
</html>`))
177-
})
177+
landingPage, err := web.NewLandingPage(landingConfig)
178+
if err != nil {
179+
logger.Error(err.Error())
180+
os.Exit(1)
181+
}
182+
http.Handle("/", landingPage)
183+
}
178184

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

0 commit comments

Comments
 (0)