census-instrumentation / opencensus-ruby

A stats collection and distributed tracing framework
Apache License 2.0
91 stars 23 forks source link

Stack trace not being logged in OpenCensus::Trace::Exporters::Logger #120

Open danielmbarlow opened 5 years ago

danielmbarlow commented 5 years ago

Stack Traces appear in the log as {},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}.

I ran this test:

# Works in plain Ruby without Rails
user ~/app $ irb
irb(main):002:0> require 'json'
=> true
irb(main):003:0> caller_locations.to_json
=> "[\"/usr/local/lib/ruby/2.5.0/irb/workspace.rb:85:in 
...
`run'\",\"/usr/local/lib/ruby/2.5.0/irb.rb:383:in `start'\",\"/usr/local/bin/irb:11:in `<main>'\"]"

# Stack trace entries hidden when loading Rails
user ~/app $ bin/rails c
Loading development environment (Rails 5.1.6)
irb(main):002:0> caller_locations.to_json
=> "[{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}]"

I'm going to submit a PR with a fix in SpanBuilder