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

Config Error: Error { inner: ErrorInner { kind: Custom, line: Some(177), col: 0, at: Some(6387), message: "unknown field threads, expected exporter", key: ["metrics"] } #3863

Closed
EsloTech opened this issue Mar 2, 2023 · 4 comments

Comments

@EsloTech
Copy link

EsloTech commented Mar 2, 2023

Linux 18.04
cbk node version v0.108.0-rc2

error:

`Config Error: Error { inner: ErrorInner { kind: Custom, line: Some(177), col: 0, at: Some(6387), message: "unknown field `threads`, expected `exporter`", key: ["metrics"] } }
Config Error: Error { inner: ErrorInner { kind: Custom, line: Some(177), col: 0, at: Some(6387), message: "unknown field `threads`, expected `exporter`", key: ["metrics"] } }
Config Error: Error { inner: ErrorInner { kind: Custom, line: Some(177), col: 0, at: Some(6387), message: "unknown field `threads`, expected `exporter`", key: ["metrics"] } }
Config Error: Error { inner: ErrorInner { kind: Custom, line: Some(177), col: 0, at: Some(6387), message: "unknown field `threads`, expected `exporter`", key: ["metrics"] } }
Config Error: Error { inner: ErrorInner { kind: Custom, line: Some(177), col: 0, at: Some(6387), message: "unknown field `threads`, expected `exporter`", key: ["metrics"] } }
Config Error: Error { inner: ErrorInner { kind: Custom, line: Some(177), col: 0, at: Some(6387), message: "unknown field `threads`, expected `exporter`", key: ["metrics"] } }`

configuration that was working on old ckb node version:

`[metrics]
threads = 3
histogram_window = 60
histogram_granularity = 1
upkeep_interval = 500

[metrics.exporter.prometheus]
target = { type = "http", listen_address = "0.0.0.0:8100" }
format = { type = "prometheus" }

[metrics.exporter.log_yaml]
target = { type = "log", level = "warn", interval = 600 }
format = { type = "yaml" }

[metrics.exporter.log_json]
target = { type = "log", level = "error", interval = 900 }
format = { type = "json" }`

updated the structure do not accept these lines.

How I should write this on the config file?

Thank you!

@EsloTech EsloTech added the t:bug Type: This doesn't seem right. label Mar 2, 2023
@driftluo driftluo removed the t:bug Type: This doesn't seem right. label Mar 2, 2023
@driftluo
Copy link
Collaborator

driftluo commented Mar 2, 2023

on #2870 we replace metrics-rs with opentelemetry-rust, the metric config has been changed

@EsloTech
Copy link
Author

EsloTech commented Mar 2, 2023

Thank you!
Does it means I should write the config like [opentelemetry] and [[opentelemetry-prometheus] / [opentelemetry-log_yaml] and so on?

@driftluo
Copy link
Collaborator

driftluo commented Mar 2, 2023

@doitian
Copy link
Member

doitian commented Mar 2, 2023

An example which is used in ckb.toml:

[metrics.exporter.prometheus]
target = { type = "prometheus", listen_address = "127.0.0.1:8100" }

listen_address is the only configurable option.

@doitian doitian closed this as completed Apr 13, 2023
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

No branches or pull requests

3 participants