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

switch logging to go-kit #109

Merged
merged 6 commits into from Oct 7, 2019
Merged

switch logging to go-kit #109

merged 6 commits into from Oct 7, 2019

Conversation

pohzipohzi
Copy link
Contributor

this fixes #108

pohzipohzi added 4 commits October 2, 2019 23:20
Signed-off-by: pohzipohzi <poh.zihow@gmail.com>
Signed-off-by: pohzipohzi <poh.zihow@gmail.com>
Signed-off-by: pohzipohzi <poh.zihow@gmail.com>
Signed-off-by: pohzipohzi <poh.zihow@gmail.com>
.gitignore Outdated Show resolved Hide resolved
main.go Outdated
parts := strings.Split(line, " ")
if len(parts) != 3 {
log.Infof("Invalid part count of %d in line: %s", len(parts), line)
level.Info(c.logger).Log("msg", "Invalid part count", "length", len(parts), "line", line)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parts may be a better key here

main.go Outdated

prometheus.MustRegister(sampleExpiryMetric)
sampleExpiryMetric.Set(sampleExpiry.Seconds())

log.Infoln("Starting graphite_exporter", version.Info())
log.Infoln("Build context", version.BuildContext())
level.Info(logger).Log("msg", "Starting graphite_exporter", "version_info", version.Info(), "version_build_context", version.BuildContext())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually do this as two lines

main.go Outdated Show resolved Hide resolved
Signed-off-by: pohzipohzi <poh.zihow@gmail.com>
@brian-brazil
Copy link
Contributor

👍

@matthiasr

main.go Outdated Show resolved Hide resolved
@matthiasr
Copy link
Contributor

Looks good otherwise!

Co-Authored-By: Matthias Rampke <mr@soundcloud.com>
Signed-off-by: pohzipohzi <poh.zihow@gmail.com>
@matthiasr matthiasr merged commit b7dde28 into prometheus:master Oct 7, 2019
@matthiasr
Copy link
Contributor

Thank you!

matthiasr pushed a commit that referenced this pull request Oct 7, 2019
this warrants a minor version bump
matthiasr pushed a commit that referenced this pull request Oct 7, 2019
Update changelog & version for #109

this warrants a minor version bump.

Signed-off-by: Matthias Rampke <mr@soundcloud.com>
vaehx pushed a commit to prosenkranz/graphite_exporter that referenced this pull request Mar 23, 2020
* master: (23 commits)
  Cut release 0.7.0
  makefile: update Makefile.common with newer version
  Release 0.7.0-rc2
  Force Cache Init
  Release 0.7.0-rc1
  Updated dependencies - Updated client golang dependency. - Updated statsd mapper dependency. - Migrated current code to new statsd mapper library.
  Update main.go
  Fixed typo
  Fixed bad label value substitution
  Added more examples on how to use regex in names
  Fixed panic on bad runtime flags.
  Update changelog for prometheus#109 (prometheus#111)
  Update main.go
  fix comments
  run go mod vendor with go 1.13
  run go mod vendor
  fix invalid key
  switch logging to go-kit
  Fix go.mod and vendor/
  *: bump Go version to 1.13
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch logging to go-kit
3 participants