Module: RailsOtelContext
- Defined in:
- lib/rails_otel_context.rb,
lib/rails_otel_context/railtie.rb,
lib/rails_otel_context/version.rb,
lib/rails_otel_context/adapters.rb,
lib/rails_otel_context/adapters/pg.rb,
lib/rails_otel_context/configuration.rb,
lib/rails_otel_context/frame_context.rb,
lib/rails_otel_context/adapters/redis.rb,
lib/rails_otel_context/adapters/mysql2.rb,
lib/rails_otel_context/request_context.rb,
lib/rails_otel_context/source_location.rb,
lib/rails_otel_context/adapters/trilogy.rb,
lib/rails_otel_context/adapters/clickhouse.rb,
lib/rails_otel_context/activerecord_context.rb,
lib/rails_otel_context/call_context_processor.rb
Defined Under Namespace
Modules: ActiveRecordContext, Adapters, FrameContext, Frameable, RequestContext, SourceLocation
Classes: CallContextProcessor, Configuration, Railtie
Constant Summary
collapse
- VERSION =
'0.8.0'
Class Method Summary
collapse
Class Method Details
.configuration ⇒ Object
21
22
23
|
# File 'lib/rails_otel_context.rb', line 21
def configuration
@configuration ||= Configuration.new
end
|
25
26
27
|
# File 'lib/rails_otel_context.rb', line 25
def configure
yield(configuration)
end
|
.pop_frame ⇒ Object
42
43
44
|
# File 'lib/rails_otel_context.rb', line 42
def pop_frame
FrameContext.pop
end
|
.push_frame(class_name:, method_name:) ⇒ Object
38
39
40
|
# File 'lib/rails_otel_context.rb', line 38
def push_frame(class_name:, method_name:)
FrameContext.push(class_name: class_name, method_name: method_name)
end
|
.reset_configuration! ⇒ Object
29
30
31
|
# File 'lib/rails_otel_context.rb', line 29
def reset_configuration!
@configuration = Configuration.new
end
|
.with_frame(class_name:, method_name:, &block) ⇒ Object
Convenience delegates to FrameContext — see FrameContext for full docs.
34
35
36
|
# File 'lib/rails_otel_context.rb', line 34
def with_frame(class_name:, method_name:, &block)
FrameContext.with_frame(class_name: class_name, method_name: method_name, &block)
end
|