epsagon 0.0.10 → 0.0.11
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 +4 -4
- data/lib/instrumentation/aws_sdk_plugin.rb +12 -5
- data/lib/instrumentation/sinatra.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab0dc77590ae9d619fa9dc901ce8af447cfa4555b3e4e2de648952add1604043
|
4
|
+
data.tar.gz: ba0e5a0589ac967734b3019e229031a345577cc44518d876228238011f3bd2a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d383f183f674c601ef695e5b47adcaa770e8d9d6cfbe22d922b4e8785dc2b6f5c677ec0abfaab7c01df880afabe8b3c0395ffc076ff67fe3393ecc06f8a37cd5
|
7
|
+
data.tar.gz: 895b8b35143b0c232e4e3611ddf32652163a191f4d58af3283101af3f2f107f396be765931c3734f5f3aebe6cf2ec4f2d19d561b4cc033286cc1a33b4f373fd2
|
@@ -1,5 +1,10 @@
|
|
1
1
|
require 'aws-sdk-core'
|
2
|
+
require 'opentelemetry/common'
|
3
|
+
require 'opentelemetry/sdk'
|
2
4
|
|
5
|
+
def untraced
|
6
|
+
OpenTelemetry::Trace.with_span(OpenTelemetry::Trace::Span.new) { yield }
|
7
|
+
end
|
3
8
|
# AWS SDK plugin for epsagon instrumentation
|
4
9
|
class EpsagonAwsPlugin < Seahorse::Client::Plugin
|
5
10
|
def add_handlers(handlers, _)
|
@@ -11,11 +16,13 @@ end
|
|
11
16
|
class EpsagonAwsHandler < Seahorse::Client::Handler
|
12
17
|
def call(context)
|
13
18
|
tracer.in_span('') do |span|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
+
untraced do
|
20
|
+
@handler.call(context).tap do
|
21
|
+
span.set_attribute('aws.service', context.client.class.to_s.split('::')[1].downcase)
|
22
|
+
span.set_attribute('aws.aws.operation', context.operation.name)
|
23
|
+
span.set_attribute('aws.region', context.client.config.region)
|
24
|
+
span.set_attribute('aws.status_code', context.http_response.status_code)
|
25
|
+
end
|
19
26
|
end
|
20
27
|
end
|
21
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Epsagon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentelemetry-api
|