Sha256: e9e8c2773811253a9a0d86e6c9d5acd12bf2d98bf597624347a54ee436139d54

Contents?: true

Size: 1.07 KB

Versions: 70

Compression:

Stored size: 1.07 KB

Contents

# This file contains a basic OpenTracing example.
#
# Note:  The instana gem automatically sets the Instana tracer
# to `OpenTracing.global_tracer`.  Once the gem is loaded, you can
# immediately start making OpenTracing calls.
#
require "opentracing"

entry_span = OpenTracing.start_span("HandMadeRackServer")

entry_span.set_tag(:'http.method', :get)
entry_span.set_tag(:'http.url', "/users")
entry_span.set_tag(:'span.kind', "entry")

intermediate_span = OpenTracing.start_span("myintermediate", :child_of => entry_span)
intermediate_span.finish()

db_span = OpenTracing.start_span('mydbspan', :child_of => entry_span)
db_span.set_tag(:'db.instance', "users")
db_span.set_tag(:'db.statement', "SELECT * FROM user_table")
db_span.set_tag(:'db.type', "mysql")
db_span.set_tag(:'db.user', "mysql_login")
db_span.set_tag(:'span.kind', "exit")
db_span.finish()

intermediate_span = OpenTracing.start_span("myintermediate", :child_of => entry_span)
intermediate_span.log("ALLOK", :message => "All seems ok")
intermediate_span.finish()

entry_span.set_tag(:'http.status_code', 200)
entry_span.finish()

Version data entries

70 entries across 70 versions & 1 rubygems

Version Path
instana-1.193.4 examples/opentracing.rb
instana-1.193.3 examples/opentracing.rb
instana-1.193.3.pre1 examples/opentracing.rb
instana-1.193.2 examples/opentracing.rb
instana-1.192.1 examples/opentracing.rb
instana-1.192.0 examples/opentracing.rb
instana-1.13.0 examples/opentracing.rb
instana-1.12.0 examples/opentracing.rb
instana-1.11.8-java examples/opentracing.rb
instana-1.11.8 examples/opentracing.rb
instana-1.11.7 examples/opentracing.rb
instana-1.11.6 examples/opentracing.rb
instana-1.11.6-java examples/opentracing.rb
instana-1.11.5 examples/opentracing.rb
instana-1.11.5-java examples/opentracing.rb
instana-1.11.4-java examples/opentracing.rb
instana-1.11.4 examples/opentracing.rb
instana-1.11.3-java examples/opentracing.rb
instana-1.11.3 examples/opentracing.rb
instana-1.11.2-java examples/opentracing.rb