Skip to content

Commit

Permalink
Add minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jterapin committed Sep 27, 2024
1 parent ddd32bb commit 7736eb0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 0 additions & 2 deletions instrumentation/aws_sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ otel_provider = Aws::Telemetry::OTelProvider.new
client = Aws::S3::Client.new(telemetry_provider: otel_provider)
```



## Example

To run the example:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,17 @@ def require_dependencies

def add_plugins(*targets)
targets.each do |klass|
if telemetry_plugin?
klass.add_plugin(AwsSdk::Plugin) unless klass.plugins.include?(Aws::Plugins::Telemetry)
else
klass.add_plugin(AwsSdk::Plugin)
end
next if supports_telemetry_plugin?(klass)

klass.add_plugin(AwsSdk::Plugin)
end
end

def supports_telemetry_plugin?(klass)
telemetry_plugin? &&
klass.plugins.include?(Aws::Plugins::Telemetry)
end

def telemetry_plugin?
::Aws.const_defined?('Plugins::Telemetry')
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module OpenTelemetry
module Instrumentation
module AwsSdk
module Patches
# TODO
# Patch for Telemetry Plugin Handler in V3 SDK
module Handler
def call(context)
span_wrapper(context) { @handler.call(context) }
Expand Down

0 comments on commit 7736eb0

Please sign in to comment.