Skip to content
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

Release v0.16.0 #278

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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