census-instrumentation / opencensus-erlang

A stats collection and distributed tracing framework
https://opencensus.io
Apache License 2.0
134 stars 39 forks source link

WIP: optional stat collector workers #106

Open tsloughter opened 5 years ago

tsloughter commented 5 years ago

This isn't ready, more of a prototype, I thought I'd open it since the idea of the record_module is what is important to get right for moving forward with configurable stat recording.

tsloughter commented 5 years ago

Certainly would be nice to not have to do the ets lookup if using the collector workers, but haven't thought of a way to do that except more codegen :(

deadtrickster commented 5 years ago

Could you please remind me what is all about? "configurable stat recording" and "collector workers"?

tsloughter commented 5 years ago

@deadtrickster yea, two things. One is to have recordings just sent as a message to a process that handles the view updating, instead of updating the views inline of the process doing the recording. This should be optional, people will have different needs and not all will necessarily benefit from not doing view updates in the same process, so it also makes how the recording is done configurable.

tsloughter commented 5 years ago

I've updated it to do a worker per scheduler.

codecov-io commented 5 years ago

Codecov Report

Merging #106 into master will decrease coverage by 1.23%. The diff coverage is 43.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #106      +/-   ##
==========================================
- Coverage   80.62%   79.39%   -1.24%     
==========================================
  Files          34       35       +1     
  Lines         707      723      +16     
==========================================
+ Hits          570      574       +4     
- Misses        137      149      +12
Impacted Files Coverage Δ
src/oc_stat.erl 84.61% <ø> (ø) :arrow_up:
src/oc_stat_collector.erl 0% <0%> (ø)
src/oc_stat_measure.erl 80.43% <100%> (-5.28%) :arrow_down:
src/opencensus_sup.erl 90.9% <75%> (-9.1%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 341ed2e...de37fc2. Read the comment docs.

deadtrickster commented 5 years ago

ok, thanks, what's the second idea?

tsloughter commented 5 years ago

Second idea? It is just making it configurable how a measure is recorded and adding an option to send a message for a recorded measure instead of updating the views in process.

deadtrickster commented 5 years ago

ah, ok. it's just how you started "...two things... One is..." and I didn't locate second :-)