class Object
Constants
- COLL_OPS
- COLL_OTHER_OPS
Collection Related Operations
- COLL_QUERY_OPS
- INDEX_OPS
Collection Index View Related Operations
- OBOE_SAMPLE_RATE_SOURCE_DEFAULT
- OBOE_SAMPLE_RATE_SOURCE_DEFAULT_MISCONFIGURED
- OBOE_SAMPLE_RATE_SOURCE_FILE
- OBOE_SAMPLE_RATE_SOURCE_LAST_OBOE
- OBOE_SAMPLE_RATE_SOURCE_OBOE
- OBOE_SAMPLE_RATE_SOURCE_OBOE_DEFAULT
- OBOE_TRACE_ALWAYS
- OBOE_TRACE_NEVER
Constants from liboboe
- OBOE_TRACE_THROUGH
- SAMPLE_RATE_MASK
- SAMPLE_SOURCE_MASK
- TRACE_FILE
Used in tests to store local trace data
- TV
Disable docs and Camelcase warns since we're implementing an interface here. See OboeBase for details. rubocop:disable Style/Documentation, Style/MethodName
Copyright © 2016 SolarWinds, LLC. All rights reserved.
Copyright © 2016 SolarWinds, LLC. All rights reserved.
Copyright © 2016 SolarWinds, LLC. All rights reserved.
Copyright © 2016 SolarWinds, LLC. All rights reserved.
Copyright © 2016 SolarWinds, LLC. All rights reserved.
Copyright © 2016 SolarWinds, LLC. All rights reserved.
- TV_STR_BLANK
- TV_STR_LABEL
- TV_STR_LAYER
- Traceview
Disable docs and Camelcase warns since we're implementing an interface here. See OboeBase for details. rubocop:disable Style/Documentation, Style/MethodName
Copyright © 2016 SolarWinds, LLC. All rights reserved.
Copyright © 2016 SolarWinds, LLC. All rights reserved.
Copyright © 2016 SolarWinds, LLC. All rights reserved.
Copyright © 2016 SolarWinds, LLC. All rights reserved.
Copyright © 2016 SolarWinds, LLC. All rights reserved.
Copyright © 2016 SolarWinds, LLC. All rights reserved.
- VIEW_OPS
- VIEW_OTHER_OPS
- VIEW_QUERY_OPS
Collection View Related Operations
- ZERO_MASK
Masks for bitwise ops
- ZERO_SAMPLE_RATE_MASK
- ZERO_SAMPLE_SOURCE_MASK
Public Instance Methods
# File lib/traceview/frameworks/rails/inst/action_view.rb, line 36 def render_collection entry_kvs = {} begin name = TraceView::Util.prettify(@path) entry_kvs[:FunctionName] = :render_collection entry_kvs[:Class] = :PartialRenderer entry_kvs[:Module] = :ActionView entry_kvs[:File] = __FILE__ entry_kvs[:LineNumber] = __LINE__ rescue => e TraceView.logger.debug "[traceview/debug] #{__method__}:#{File.basename(__FILE__)}:#{__LINE__}: #{e.message}" if TraceView::Config[:verbose] end TraceView::API.profile(name, entry_kvs, TraceView::Config[:action_view][:collect_backtraces]) do render_collection_without_traceview end end
# File lib/traceview/frameworks/rails/inst/action_view.rb, line 17 def render_partial entry_kvs = {} begin name = TraceView::Util.prettify(@options[:partial]) if @options.is_a?(Hash) entry_kvs[:FunctionName] = :render_partial entry_kvs[:Class] = :PartialRenderer entry_kvs[:Module] = :ActionView entry_kvs[:File] = __FILE__ entry_kvs[:LineNumber] = __LINE__ rescue => e TraceView.logger.debug "[traceview/debug] #{__method__}:#{File.basename(__FILE__)}:#{__LINE__}: #{e.message}" if TraceView::Config[:verbose] end TraceView::API.profile(name, entry_kvs, TraceView::Config[:action_view][:collect_backtraces]) do render_partial_without_traceview end end
# File lib/traceview/frameworks/rails/inst/action_view_2x.rb, line 35 def render_partial_collection(options = {}) entry_kvs = {} begin name = 'partial_collection' entry_kvs[:FunctionName] = :render_partial_collection entry_kvs[:Class] = :Partials entry_kvs[:Module] = :ActionView entry_kvs[:File] = __FILE__ entry_kvs[:LineNumber] = __LINE__ rescue => e TraceView.logger.debug "[traceview/debug] #{__method__}:#{File.basename(__FILE__)}:#{__LINE__}: #{e.message}" if TraceView::Config[:verbose] end TraceView::API.profile(name, entry_kvs, TraceView::Config[:action_view][:collect_backtraces]) do render_partial_collection_without_traceview(options) end end
# File lib/traceview/inst/http.rb, line 9 def request_with_traceview(*args, &block) # If we're not tracing, just do a fast return. Since # net/http.request calls itself, only trace # once the http session has been started. if !TraceView.tracing? || !started? return request_without_traceview(*args, &block) end # Avoid cross host tracing for blacklisted domains blacklisted = TraceView::API.blacklisted?(addr_port) TraceView::API.trace(:'net-http') do opts = {} context = TraceView::Context.toString() task_id = TraceView::XTrace.task_id(context) # Collect KVs to report in the info event if args.length && args[0] req = args[0] opts[:IsService] = 1 opts[:RemoteProtocol] = use_ssl? ? :HTTPS : :HTTP opts[:RemoteHost] = addr_port # Conditionally log query params if TraceView::Config[:nethttp][:log_args] opts[:ServiceArg] = req.path else opts[:ServiceArg] = req.path.split('?').first end opts[:HTTPMethod] = req.method opts[:Blacklisted] = true if blacklisted opts[:Backtrace] = TraceView::API.backtrace if TraceView::Config[:nethttp][:collect_backtraces] req['X-Trace'] = context unless blacklisted end begin # The actual net::http call resp = request_without_traceview(*args, &block) # Re-attach net::http edge unless blacklisted and is a valid X-Trace ID unless blacklisted xtrace = resp.get_fields('X-Trace') xtrace = xtrace[0] if xtrace && xtrace.is_a?(Array) if TraceView::XTrace.valid?(xtrace) # Assure that we received back a valid X-Trace with the same task_id if task_id == TraceView::XTrace.task_id(xtrace) TraceView::Context.fromString(xtrace) else TraceView.logger.debug "Mismatched returned X-Trace ID : #{xtrace}" end end end opts[:HTTPStatus] = resp.code # If we get a redirect, report the location header if ((300..308).to_a.include? resp.code.to_i) && resp.header["Location"] opts[:Location] = resp.header["Location"] end next resp ensure # Log the info event with the KVs in opts TraceView::API.log(:'net-http', :info, opts) end end end