File tree 5 files changed +26
-17
lines changed
5 files changed +26
-17
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ executors:
5
5
# Whenever the Go version is updated here, .promu.yml should also be updated.
6
6
golang :
7
7
docker :
8
- - image : cimg/go:1.22
8
+ - image : cimg/go:1.23
9
9
jobs :
10
10
test :
11
11
executor : golang
Original file line number Diff line number Diff line change 1
1
go :
2
2
# Whenever the Go version is updated here, .travis.yml and
3
3
# .circle/config.yml should also be updated.
4
- version : 1.22
4
+ version : 1.23
5
5
repository :
6
6
path : github.com/prometheus/graphite_exporter
7
7
build :
10
10
path : ./cmd/graphite_exporter
11
11
- name : getool
12
12
path : ./cmd/getool
13
- flags : -a -tags netgo
14
13
ldflags : |
15
14
-X github.com/prometheus/common/version.Version={{.Version}}
16
15
-X github.com/prometheus/common/version.Revision={{.Revision}}
Original file line number Diff line number Diff line change
1
+ ## 0.16.0 / 2024-10-29
2
+
3
+ * [ CHANGE] Replace logging with Go slog library #277
4
+
1
5
## 0.15.2 / 2024-03-22
2
6
3
7
* [ SECURITY] Update Go to 1.22, update dependencies
Original file line number Diff line number Diff line change 1
- 0.15.2
1
+ 0.16.0
Original file line number Diff line number Diff line change @@ -161,20 +161,26 @@ func main() {
161
161
}
162
162
}()
163
163
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
+ },
168
176
}
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
+ }
178
184
179
185
server := & http.Server {}
180
186
if err := web .ListenAndServe (server , toolkitFlags , logger ); err != nil {
You can’t perform that action at this time.
0 commit comments