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

Telemetry #70

Closed
wants to merge 6 commits into from
Closed

Telemetry #70

wants to merge 6 commits into from

Conversation

findkim
Copy link
Contributor

@findkim findkim commented Jun 26, 2020

This PR adds OpenTelemetry as the metrics engine and hashicorp/hcl-opentelemetry boilerplate library for loading configuration and initializing sinks. These changes aim to report the same metrics proposed in #67

Metrics

Metric Name Description
consul-esm.coord.txn A counter of node check updates using Consul txn API
consul-esm.check.txn A counter of check updates using Consul txn API
consul-esm.checks.update.ms The duration (milliseconds) to update checks

Example output

Stdout

{"time":"2020-06-26T16:19:40.233463-05:00","updates":[{"name":"consul-esm.checks.update.ms","min":0,"max":0,"sum":0,"count":1,"quantiles":[{"q":0.5,"v":0},{"q":0.9,"v":0},{"q":0.99,"v":0}]}]}

Dogstatsd

2020-06-26 16:30:30.435691 consul-esm.checks.update.ms:0|h
2020-06-26 16:30:45.437495 consul-esm.coord.txn:1|c

Prometheus

$ curl localhost:8888/metrics
# HELP consul_esm_check_txn A counter of node check updates using Consul txn API
# TYPE consul_esm_check_txn counter
consul_esm_check_txn 1
# HELP consul_esm_checks_update_ms The duration (milliseconds) to update checks
# TYPE consul_esm_checks_update_ms histogram
consul_esm_checks_update_ms_bucket{le="+Inf"} 2
consul_esm_checks_update_ms_sum 0
consul_esm_checks_update_ms_count 2

findkim added 4 commits June 23, 2020 17:52
Project path assumes current working directly is in the GOPATH.
This is no longer a valid assumption with the move to modules and
go 1.11+
config.go Show resolved Hide resolved
@findkim
Copy link
Contributor Author

findkim commented Jul 21, 2020

A lot of work has been put into experimenting with a new telemetry library, but sitting on this PR for a while I am not happy with how timers are currently reported. The measurement type is denoted by manually added suffix to the metric name, and puts the responsibility of type conversion on the user rather than systematically by the metric platform.

I'm going to close this in preference for the work @mikeyyuen and @lornasong have prepared in #67

@findkim findkim closed this Jul 21, 2020
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.

1 participant