Module: D13n::Metric::Instrumentation::EmWebSocket
Defined Under Namespace
Modules: ClassMethods
Class Method Summary
collapse
Instance Method Summary
collapse
#perform_websocket_with_d13n_stream
Class Method Details
.included(descendance) ⇒ Object
37
38
39
|
# File 'lib/d13n/metric/instrumentation/em-websocket.rb', line 37
def self.included(descendance)
descendance.extend(ClassMethods)
end
|
Instance Method Details
#send_with_d13n_instrumentation(*args, &block) ⇒ Object
54
55
56
57
58
|
# File 'lib/d13n/metric/instrumentation/em-websocket.rb', line 54
def send_with_d13n_instrumentation(*args, &block)
response_length = args[0].size if args.is_a?(Array)
request[:response_content_length] = response_length || 0 if request.is_a?(Hash)
send_without_d13n_instrumentation(*args, &block)
end
|
#trigger_on_close_with_d13n_instrumentation(*args, &block) ⇒ Object
64
65
66
|
# File 'lib/d13n/metric/instrumentation/em-websocket.rb', line 64
def trigger_on_close_with_d13n_instrumentation(*args, &block)
trigger_on_close_without_d13n_instrumentation(*args, &block)
end
|
#trigger_on_message_with_d13n_instrumentation(*args, &block) ⇒ Object
45
46
47
48
49
50
51
52
|
# File 'lib/d13n/metric/instrumentation/em-websocket.rb', line 45
def trigger_on_message_with_d13n_instrumentation(*args, &block)
options = {:category => :websocket, :name => :websocket_onmessage}
request[:request_content_length] = args[0].size if args.is_a?(Array)
perform_websocket_with_d13n_stream(options) do
trigger_on_message_without_d13n_instrumentation(*args, &block)
end
end
|
#trigger_on_open_with_d13n_instrumentation(*args, &block) ⇒ Object
60
61
62
|
# File 'lib/d13n/metric/instrumentation/em-websocket.rb', line 60
def trigger_on_open_with_d13n_instrumentation(*args, &block)
trigger_on_open_without_d13n_instrumentation(*args, &block)
end
|