census-instrumentation / opencensus-specs

Apache License 2.0
188 stars 50 forks source link

Proposal: Add specs on VM/system and other common metrics. #225

Open songy23 opened 5 years ago

songy23 commented 5 years ago

In other libraries it's common to have default metrics on VM/system, such as JVM metrics in Micrometer and CPU usage in Prometheus. Currently in OC we have specs for default metrics on gRPC and HTTP. However we don't yet have specs on system metrics. Consider defining and adding specs on default system-level metrics.

/cc @dhaval24

reyang commented 5 years ago

Should these common metrics be defined in OpenMetrics spec or here (opencensus-specs)?

songy23 commented 5 years ago

AFAIK OpenMetrics is more about data format. The default metrics are OpenCensus-specific so IMO it makes more sense to put it under this repo.

bogdandrutu commented 5 years ago

@reyang OpenMetrics will be compatible with our data-format https://github.com/census-instrumentation/opencensus-proto/tree/master/src/opencensus/proto/metrics/v1. I've been talking to them pretty regularly and our format is very close to their and 100% compatible (unless something changed in the past month).

This is probably more about standardization of common metrics (system metrics, etc.).

hauleth commented 5 years ago

Gathering VM metrics in way that would be common between different languages can be hard, as each VM will have it's own specifics and quirks, for example in Erlang there are a lot of VM metrics that are quite specific to this given runtime (reductions count, queues length, etc.).

I understand system metrics though, but still I see problems there as metrics that we can gather changes from system to system, and some can be system specific (and sometimes we can run application within jail that will prevent gathering system metrics or will make them pointless, ex. Docker containers).

tsloughter commented 5 years ago

For VM metrics I think it would still be nice to define some common tags and maybe metric prefixes (maybe only Erlang has reduction_count but the prefix to the full metric name could be defined).

So tags like runtime, runtime_version, etc. and a metrics like <runtime>.<metric name>.