opencensus-beam / opencensus_elixir

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Behaviour for process context management?

garthk opened this issue · comments

Further to the discussion about :seq_trace we ended up having in absinthe-graphql/absinthe#757, and it being polite to come up with a way to not stuff up people already using the label, it occurs to me we could:

  • define a @behaviour for remembering a span context for the current process, retrieving it later, and retrieving it from our parents
  • provide one implementation satisfying it with the process dictionary
  • provide another satisfying it :seq_trace
  • let people configure which one they wanted to use

… and then if someone needed the seq_trace using the seq_trace label already, they could whip up their own implementation to coordinate things.

Such a behaviour should properly be configured and used from :opencensus, but I'll prototype it in Elixir in our app's fork of with_child_span/3 and report back on how it goes.

This is what I'm doing with a proposal implementation for OpenTelemetry Erlang lib. I hope to have a PR open in the next day or so for comment.

Moot, given the OT work.