ApplicationInsights-Ruby
ApplicationInsights-Ruby copied to clipboard
Success always false in TelemetryClient.track_request?
Hi folks,
I noticed a little oddity while overriding code from telemetry_client.rb
.
The ternary operator (full snippet below) seems to use =
rather than ==
and so it seems like success will always be false.
:success => success = nil ? true : success,
telemetry_client.rb
def track_request(id, start_time, duration, response_code, success, options={})
data = Channel::Contracts::RequestData.new(
:success => success = nil ? true : success,
# etc ...
)
self.channel.write(data, self.context)
end