application_insights 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/README.md +2 -0
- data/lib/application_insights/channel/sender_base.rb +5 -2
- data/lib/application_insights/channel/synchronous_sender.rb +1 -1
- data/lib/application_insights/version.rb +1 -1
- data/test/application_insights/channel/test_synchronous_sender.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Nzg1ZmY4ZmVkNGVmNzY4MTY1ZmU5MTgxMmM0NGRmNGJlMGUwZTAxYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzY2YjU4OTM1NzAzNGE4ZDk4NzhlZDgwYWI3Y2VmYzMzOGVhOWM0OA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZjI2ZTM5MWUyZDViNjFhYzY0MjUzZmQyZTI1YTFhYTE1MjYwYzYxNTA4ZjU3
|
10
|
+
MDU2Zjk4NWRhODkzY2IzNTA5NjM1M2Q2Njg0OTkwNjliNDY4YjE0NjQyN2Vi
|
11
|
+
ZDg4YzI5ZTg2NjYwZGQyNjUzMzc4NDYxMmYxMGY1OWE0ZGJiYTU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDc0MTc2ZTdjODBjY2IzM2NiZGU2MjI1MWIzN2ZkYjdkMWE4NmVmODRlMGYw
|
14
|
+
ZGJjYmM5NWQ0MDgzZWM1Nzg4ZDY0ZDFhNzEyMTBmMzdhNGEwNTFlNzhkMmI0
|
15
|
+
M2MzNjFlYzU5NDk4OTRiNGIyMDEzZWNjNDU3MTcwMDkwYjZlN2M=
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Application Insights SDK for Ruby #
|
2
2
|
|
3
|
+
[](http://badge.fury.io/rb/application_insights)
|
4
|
+
|
3
5
|
>Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write.
|
4
6
|
> -- <cite>[Ruby - Official Site](https://www.ruby-lang.org/en/)</cite>
|
5
7
|
|
@@ -28,9 +28,12 @@ module ApplicationInsights
|
|
28
28
|
request = Net::HTTP::Post.new(uri.path, { 'Accept' => 'application/json', 'Content-Type' => 'application/json; charset=utf-8' })
|
29
29
|
request.body = data_to_send.to_json
|
30
30
|
|
31
|
-
|
32
|
-
|
31
|
+
http = Net::HTTP.new uri.hostname, uri.port
|
32
|
+
if uri.scheme.downcase == 'https'
|
33
|
+
http.use_ssl = true
|
34
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
33
35
|
end
|
36
|
+
response = http.request(request)
|
34
37
|
|
35
38
|
case response
|
36
39
|
when Net::HTTPSuccess, Net::HTTPRedirection, Net::HTTPBadRequest
|
@@ -5,7 +5,7 @@ module ApplicationInsights
|
|
5
5
|
# A synchronous sender that works in conjunction with SynchronousQueue.
|
6
6
|
class SynchronousSender < SenderBase
|
7
7
|
# Initializes a new instance of the synchronous sender class.
|
8
|
-
def initialize(service_endpoint_uri='
|
8
|
+
def initialize(service_endpoint_uri='https://dc.services.visualstudio.com/v2/track')
|
9
9
|
super service_endpoint_uri
|
10
10
|
end
|
11
11
|
end
|
@@ -6,6 +6,6 @@ include ApplicationInsights::Channel
|
|
6
6
|
class TestSynchronousSender < Test::Unit::TestCase
|
7
7
|
def test_initialize
|
8
8
|
sender = SynchronousSender.new
|
9
|
-
assert_equal '
|
9
|
+
assert_equal 'https://dc.services.visualstudio.com/v2/track', sender.service_endpoint_uri
|
10
10
|
end
|
11
11
|
end
|