epsagon 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/epsagon.rb +1 -0
- metadata +1 -2
- data/lib/epsagon_opentelemetry.rb +0 -42
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd8b447f6b5d8e9f1dc22ae3b5e11e05b5236e4c84acb54b940e2cbb04d4f2ac
|
4
|
+
data.tar.gz: 45822ce4a73671ac392e1f380b10a37b87fcf4ab2f292eb4e3255d289838a188
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c4bcf3d0d267bc843610351b8eb5788e5e99613fbc7f40b36acfdada628c73d5b3f524b69b5ceaa0fda047abbc9e0bc18bdccd0edfe59f3aa2b52f8650e9fc8
|
7
|
+
data.tar.gz: e4440cffd10b7a003dbbeac40b3521a8f9465ef0a3bc3d30df2e87c62d02067c09863e1bf0f49129172cd1a3f5291c83a489bdc91d79a6f6f9a8cd3a96a64574
|
data/lib/epsagon.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: epsagon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Epsagon
|
@@ -105,7 +105,6 @@ extensions: []
|
|
105
105
|
extra_rdoc_files: []
|
106
106
|
files:
|
107
107
|
- lib/epsagon.rb
|
108
|
-
- lib/epsagon_opentelemetry.rb
|
109
108
|
- lib/instrumentation/aws_sdk.rb
|
110
109
|
- lib/instrumentation/faraday.rb
|
111
110
|
- lib/instrumentation/net_http.rb
|
@@ -1,42 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'rubygems'
|
4
|
-
require 'net/http'
|
5
|
-
require 'bundler/setup'
|
6
|
-
require 'opentelemetry'
|
7
|
-
|
8
|
-
require_relative 'instrumentation/sinatra'
|
9
|
-
require_relative 'instrumentation/net_http'
|
10
|
-
require_relative 'instrumentation/faraday'
|
11
|
-
require_relative 'util'
|
12
|
-
|
13
|
-
Bundler.require
|
14
|
-
|
15
|
-
def metadata_only?
|
16
|
-
ENV['EPSAGON_METADATA']&.to_s&.downcase != 'false'
|
17
|
-
end
|
18
|
-
|
19
|
-
def debug?
|
20
|
-
ENV['EPSAGON_DEBUG']&.to_s&.downcase == 'true'
|
21
|
-
end
|
22
|
-
|
23
|
-
# #config opentelemetry with epsaon extensions:
|
24
|
-
OpenTelemetry::SDK.configure do |c|
|
25
|
-
c.use 'EpsagonSinatraInstrumentation'
|
26
|
-
c.use 'EpsagonNetHTTPInstrumentation'
|
27
|
-
c.use 'EpsagonFaradayInstrumentation'
|
28
|
-
if debug?
|
29
|
-
c.add_span_processor OpenTelemetry::SDK::Trace::Export::SimpleSpanProcessor.new(
|
30
|
-
OpenTelemetry::SDK::Trace::Export::ConsoleSpanExporter.new
|
31
|
-
)
|
32
|
-
else
|
33
|
-
c.add_span_processor OpenTelemetry::SDK::Trace::Export::SimpleSpanProcessor.new(
|
34
|
-
EpsagonExporter.new(headers: {
|
35
|
-
epasgon_token: ENV['EPSAGON_TOKEN'],
|
36
|
-
epasgon_app_name: ENV['EPSAGON_APP_NAME']
|
37
|
-
},
|
38
|
-
endpoint: '7fybd5lgpc.execute-api.us-east-2.amazonaws.com:443/dev/trace',
|
39
|
-
insecure: false)
|
40
|
-
)
|
41
|
-
end
|
42
|
-
end
|