opentelemetry-erlang icon indicating copy to clipboard operation
opentelemetry-erlang copied to clipboard

Add pid to active span table?

Open tsloughter opened this issue 4 years ago • 3 comments

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?

tsloughter avatar Oct 18 '19 15:10 tsloughter

It seems that each span would start two monitors. Is that right? That would cause hell lot of monitors and messages in some applications.

hauleth avatar Oct 18 '19 16:10 hauleth

No, it would be optional. Person would include an option monitor when calling start_span.

tsloughter avatar Oct 18 '19 16:10 tsloughter

Oh, and definitely not "two". The pid stored in the active spans table is not a monitor. It is just used by the sweeper.

tsloughter avatar Oct 18 '19 16:10 tsloughter