opentelemetry-erlang
opentelemetry-erlang copied to clipboard
Add pid to active span table?
As I was thinking about adding a monitor
option to spans so that they can be ended if the process dies I realized it was probably a good idea to also add it to the active table so the sweeper can make a judgement on it for spans not monitored.
The sweeper could then be configured to either ignore expired spans if the process that created it is still alive or to only care about if the process that created it is dead. Meaning, expiration of infinity but if the pid is no longer alive it will sweep it.
Thoughts?
It seems that each span would start two monitors. Is that right? That would cause hell lot of monitors and messages in some applications.
No, it would be optional. Person would include an option monitor
when calling start_span
.
Oh, and definitely not "two". The pid stored in the active spans table is not a monitor. It is just used by the sweeper.