Sha256: ad567956a6a19ff997d5a964eca491cd0bdd65a4cc0aee4715909afe74625a2a

Contents?: true

Size: 1.14 KB

Versions: 64

Compression:

Stored size: 1.14 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.
#

# (c) Copyright IBM Corp. 2021
# (c) Copyright Instana Inc. 2018

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

64 entries across 64 versions & 1 rubygems

Version Path
instana-1.217.1 examples/opentracing.rb
instana-1.217.0 examples/opentracing.rb
instana-1.216.0 examples/opentracing.rb
instana-1.215.1 examples/opentracing.rb
instana-1.215.0 examples/opentracing.rb
instana-1.214.4 examples/opentracing.rb
instana-1.214.3 examples/opentracing.rb
instana-1.214.2 examples/opentracing.rb
instana-1.214.1 examples/opentracing.rb
instana-1.214.0 examples/opentracing.rb
instana-1.213.3 examples/opentracing.rb
instana-1.213.2 examples/opentracing.rb
instana-1.213.1 examples/opentracing.rb
instana-1.213.0 examples/opentracing.rb
instana-1.212.0 examples/opentracing.rb
instana-1.211.0 examples/opentracing.rb
instana-1.210.1 examples/opentracing.rb
instana-1.210.0 examples/opentracing.rb
instana-1.209.8 examples/opentracing.rb
instana-1.209.7 examples/opentracing.rb