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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a4bed616ed52fa572f7574732c18cdc87a34a6a223f969e3a0bdf95b7a132e77
4
- data.tar.gz: b502868b35380f9187fbf2a452036060ac61ccabfae509ba4cfb66ed221a7365
3
+ metadata.gz: bd8b447f6b5d8e9f1dc22ae3b5e11e05b5236e4c84acb54b940e2cbb04d4f2ac
4
+ data.tar.gz: 45822ce4a73671ac392e1f380b10a37b87fcf4ab2f292eb4e3255d289838a188
5
5
  SHA512:
6
- metadata.gz: 0e4ab80eab789716260eea7824800b1e6c0f193114e72b45da826f36bdefedb59cc4e01147dbe4e8bb5824d10e2c525ed085d6bf256387746967009b13e7425a
7
- data.tar.gz: cf2f072e8b3688c6988664304b06cad165fe43314aa862dae5ea4ef0ccb0a303f9b48dff56ff2913a5e86377f0186c23b13d7966bf3239c609606ab669e3fee3
6
+ metadata.gz: 3c4bcf3d0d267bc843610351b8eb5788e5e99613fbc7f40b36acfdada628c73d5b3f524b69b5ceaa0fda047abbc9e0bc18bdccd0edfe59f3aa2b52f8650e9fc8
7
+ data.tar.gz: e4440cffd10b7a003dbbeac40b3521a8f9465ef0a3bc3d30df2e87c62d02067c09863e1bf0f49129172cd1a3f5291c83a489bdc91d79a6f6f9a8cd3a96a64574
data/lib/epsagon.rb CHANGED
@@ -4,6 +4,7 @@ require 'rubygems'
4
4
  require 'net/http'
5
5
  require 'bundler/setup'
6
6
  require 'opentelemetry/sdk'
7
+ require 'opentelemetry/exporter/otlp'
7
8
 
8
9
  require_relative 'instrumentation/sinatra'
9
10
  require_relative 'instrumentation/net_http'
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.6
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