Module: Aws::Xray
- Defined in:
- lib/aws/xray.rb,
lib/aws/xray/rack.rb,
lib/aws/xray/cause.rb,
lib/aws/xray/error.rb,
lib/aws/xray/rails.rb,
lib/aws/xray/trace.rb,
lib/aws/xray/client.rb,
lib/aws/xray/errors.rb,
lib/aws/xray/context.rb,
lib/aws/xray/faraday.rb,
lib/aws/xray/request.rb,
lib/aws/xray/segment.rb,
lib/aws/xray/sockets.rb,
lib/aws/xray/version.rb,
lib/aws/xray/response.rb,
lib/aws/xray/sub_segment.rb,
lib/aws/xray/configuration.rb,
lib/aws/xray/header_parser.rb,
lib/aws/xray/error_handlers.rb,
lib/aws/xray/hooks/net_http.rb,
lib/aws/xray/version_detector.rb,
lib/aws/xray/annotation_normalizer.rb
Defined Under Namespace
Modules: AnnotationNormalizer, HeaderParser, Hooks Classes: BaseError, CanNotSendAllByteError, Cause, Client, Configuration, Context, DefaultErrorHandler, Error, ErrorHandlerWithSentry, Faraday, IoSocket, MissingNameError, NotSetError, NullSocket, Rack, Railtie, Request, Response, Segment, SegmentDidNotStartError, SubSegment, TestSocket, Trace, VersionDetector
Constant Summary collapse
- TRACE_HEADER =
'X-Amzn-Trace-Id'.freeze
- VERSION =
'0.17.2'
Class Attribute Summary collapse
-
.config ⇒ Object
readonly
Returns the value of attribute config.
Class Method Summary collapse
Class Attribute Details
.config ⇒ Object (readonly)
Returns the value of attribute config.
14 15 16 |
# File 'lib/aws/xray.rb', line 14 def config @config end |
Class Method Details
.trace(name: nil) ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/aws/xray.rb', line 18 def self.trace(name: nil) name = name || config.name || raise(MissingNameError) client = Client.new(Aws::Xray.config.) Context.with_new_context(name, client, Trace.generate) do Context.current.base_trace do |seg| yield seg end end end |