Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Improve logging after the switch to github.com/go-kit/kit/log #278

Merged
merged 1 commit into from
Feb 7, 2023

Conversation

pelov
Copy link
Contributor

@pelov pelov commented Feb 1, 2023

Description

After the switch to github.com/go-kit/kit/log the current log output doesn't look very readable. The switch doesn't require simply using level.Debug(logger).Log but also formatting the logs using key value pairs.

How Has This Been Tested?

Looked briefly at the log output in a real instance and they look better but haven't checked carefully every log line, so feel free to test it yourself and suggest improvements.

@pelov
Copy link
Contributor Author

pelov commented Feb 1, 2023

Fixes #262.

@Yannig
Copy link
Collaborator

Yannig commented Feb 3, 2023

Hi. Can you try to rebase your work with latest version?

@pelov pelov force-pushed the logging branch 2 times, most recently from 7fc6c69 to 0e3b2f6 Compare February 5, 2023 22:45
@vutkin
Copy link
Contributor

vutkin commented Feb 6, 2023

Hi @pelov, could you please bump version to 4.2 and do a rebase from master?

@Yannig Yannig merged commit 4222bbf into iamseth:master Feb 7, 2023
schmikei added a commit to observIQ/oracledb_exporter that referenced this pull request Apr 14, 2023
* remove metric scrape interval as it should be up to the invoker how to run

* feat: add gh workflows (iamseth#265)

* Bump github.com/BurntSushi/toml from 1.2.0 to 1.2.1 (iamseth#271)

Bumps [github.com/BurntSushi/toml](https://github.com/BurntSushi/toml) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/BurntSushi/toml/releases)
- [Commits](BurntSushi/toml@v1.2.0...v1.2.1)

---
updated-dependencies:
- dependency-name: github.com/BurntSushi/toml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/prometheus/exporter-toolkit from 0.7.3 to 0.8.2 (iamseth#272)

Bumps [github.com/prometheus/exporter-toolkit](https://github.com/prometheus/exporter-toolkit) from 0.7.3 to 0.8.2.
- [Release notes](https://github.com/prometheus/exporter-toolkit/releases)
- [Changelog](https://github.com/prometheus/exporter-toolkit/blob/master/CHANGELOG.md)
- [Commits](prometheus/exporter-toolkit@v0.7.3...v0.8.2)

---
updated-dependencies:
- dependency-name: github.com/prometheus/exporter-toolkit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/prometheus/client_golang from 1.13.0 to 1.14.0 (iamseth#274)

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.13.0 to 1.14.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](prometheus/client_golang@v1.13.0...v1.14.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/prometheus/common from 0.37.0 to 0.39.0 (iamseth#273)

Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.37.0 to 0.39.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](prometheus/common@v0.37.0...v0.39.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: Fixed github action runs against forked repos (iamseth#280)

* chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

fix: fix typo

fix: fix typo

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

fix: fix typo

* chore: savepoint

chore: savepoint

feat: test gh action pr-cleanup (#2)

* feat: test gh action pr-cleanup

* chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

* chore: savepoint

* chore: savepoint

* chore: savepoint

* chore: savepoint

* chore: savepoint

* chore: savepoint

* chore: savepoint

* feat: do a release 0.4.1 (#3)

* chore: savepoint

* chore: savepoint

* chore: savepoint

* feat: do a release 0.4.2 (iamseth#4)

* chore: savepoint

* chore: savepoint (iamseth#5)

* chore: savepoint

* chore: savepoint

* chore: savepoint

* feat: do release 0.4.4 (iamseth#6)

* feat: do a release 0.4.4

* chore: savepoint

* chore: savepoint

* chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

chore: savepoint

* fix: fix GitHub release failed with status: 403 (iamseth#282)

* Fix 0.4.0 compilation problem (iamseth#277)

* Fix parsing kingpin flags according to exporter-toolkit v0.8.2

Fixes iamseth#275

Signed-off-by: Nikolay Pelov <[email protected]>

* Update README file to reflect the changed options from exporter-toolkit.

* Update release version to 0.4.1

---------

Signed-off-by: Nikolay Pelov <[email protected]>

* Improve logging after the switch to github.com/go-kit/kit/log (iamseth#278)

Signed-off-by: Nikolay Pelov <[email protected]>

* refact: refact PR/release github-actions  (iamseth#286)

* refact: refact PR github action a bit

* chore: savepoint

* chore: savepoint

* Caiwc/multi target (iamseth#234)

* feat(): support scrape multi target

rebase branch && update Makefile version

* add multi-target explain to readme

* docs: correct dns example port of readme

---------

Co-authored-by: wccai <[email protected]>
Co-authored-by: wccai <wccai@easyops>

* README: add example of image hosted on github image registry

* Bump golang.org/x/net from 0.4.0 to 0.7.0 (iamseth#290)

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.4.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](golang/net@v0.4.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/prometheus/common from 0.39.0 to 0.40.0 (iamseth#291)

Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.39.0 to 0.40.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](prometheus/common@v0.39.0...v0.40.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/prometheus/common from 0.40.0 to 0.41.0 (iamseth#292)

Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.40.0 to 0.41.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](prometheus/common@v0.40.0...v0.41.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/prometheus/exporter-toolkit from 0.8.2 to 0.9.0 (iamseth#294)

Bumps [github.com/prometheus/exporter-toolkit](https://github.com/prometheus/exporter-toolkit) from 0.8.2 to 0.9.0.
- [Release notes](https://github.com/prometheus/exporter-toolkit/releases)
- [Changelog](https://github.com/prometheus/exporter-toolkit/blob/master/CHANGELOG.md)
- [Commits](prometheus/exporter-toolkit@v0.8.2...v0.9.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/exporter-toolkit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/prometheus/exporter-toolkit from 0.9.0 to 0.9.1 (iamseth#295)

Bumps [github.com/prometheus/exporter-toolkit](https://github.com/prometheus/exporter-toolkit) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/prometheus/exporter-toolkit/releases)
- [Changelog](https://github.com/prometheus/exporter-toolkit/blob/master/CHANGELOG.md)
- [Commits](prometheus/exporter-toolkit@v0.9.0...v0.9.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/exporter-toolkit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/prometheus/common from 0.41.0 to 0.42.0 (iamseth#296)

Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.41.0 to 0.42.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](prometheus/common@v0.41.0...v0.42.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix broken link (iamseth#298)

* 👷 Update packages versions + clean up

* Update packages versions + clean up
* Use Oracle image to retrieve binaries
* Use FQN for docker image

* 🐛 Fix oraclelinux image build

* 🔧 Use a parameter to set oracle client version

* remove percent and hyphen (iamseth#302)

Some oracledb tables return names with % and -

* try to resolve scrape interval of 0 implications

* fix scrape interval nil check

* fix synchronization

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Nikolay Pelov <[email protected]>
Co-authored-by: Viktor Utkin <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nikolay Pelov <[email protected]>
Co-authored-by: caiwc <[email protected]>
Co-authored-by: wccai <[email protected]>
Co-authored-by: wccai <wccai@easyops>
Co-authored-by: Yannig Perré <[email protected]>
Co-authored-by: markruler <[email protected]>
Co-authored-by: Yannig <[email protected]>
Co-authored-by: Egor Sidortsov <[email protected]>
@gjrlopes
Copy link

Hi @Yannig

This improvement was lost in the 0.5.1 version.
Due this the log have several lines without "msg" key and with "(MISSING)" as value. Check log messages below:

{
  "Launching connection: ": "***@192.168.1.100:1521/XE",
  "caller": "collector.go:326",
  "level": "debug",
  "ts": "2023-11-15T11:56:26.179Z"
}

{
  "caller": "collector.go:332",
  "level": "debug",
  "set max idle connections to ": 0,
  "ts": "2023-11-15T11:56:26.179Z"
}

{
  "caller": "collector.go:334",
  "level": "debug",
  "set max open connections to ": 10,
  "ts": "2023-11-15T11:56:26.179Z"
}

{
  "Successfully loaded custom metrics from: /tmp/custom-metrics.toml": "(MISSING)",
  "caller": "collector.go:389",
  "level": "info",
  "ts": "2023-11-15T11:56:27.575Z"
}

{
  "About to scrape metric: ": "(MISSING)",
  "caller": "collector.go:283",
  "level": "debug",
  "ts": "2023-11-15T11:56:27.575Z"
}

{
  "(Ignored unless Histogram type)": "(MISSING)",
  "- Metric MetricsBuckets: ": null,
  "caller": "collector.go:287",
  "level": "debug",
  "ts": "2023-11-15T11:56:27.575Z"
}

Example from 0.4.4:

{
  "caller": "main.go:364",
  "level": "debug",
  "msg": "Query result looks like",
  "ts": "2023-11-15T12:15:14.325Z",
  "value": 2090
}

Same message from 0.5.1:

{
  "Query result looks like: ": 17170432,
  "caller": "collector.go:426",
  "level": "debug",
  "ts": "2023-11-15T11:56:28.417Z"
}

Is it possible to reimplement it and release a new version?
Best regards

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants