aws / aws/aws-xray-sdk-ruby

invalid configuration option `:xray_recorder' on Kinesis

Open
#51 7 comments 0 reactions 1 assignee Claimed by @srprash View on GitHub
Dominant language
Ruby
Stars
60
Forks
54
PR merge metrics
No merged PRs in 30d

Description

Hi guys, are there better documentations on what dependencies i'll need to update for working with instrumenting this SDK with Ruby Lambda functions?

I [followed the example](https://github.com/awsdocs/aws-lambda-developer-guide/blob/master/sample-apps/blank-ruby/function/lambda_function.rb#L5-L22), and have tried to instrument X-Ray with a Lambda function (with Kinesis data stream as its event source).

```rb
require 'aws-sdk-lambda'
require 'aws-xray-sdk/lambda'

require './lib/logger.rb'

xray_config = {
context_missing: 'LOG_ERROR',
logger: LOGGER
}
XRay.recorder.configure(xray_config)

def my_function(event:, context:)
client = Aws::Lambda::Client.new

# business logic

client.get_account_settings.account_usage.to_h
end
```

However, I seem to hit a possible bug(?) :
```
invalid configuration option `:xray_recorder'
```

The redacted error trace:

```

"/var/task/vendor/bundle/ruby/2.5.0/gems/aws-sdk-core-3.72.0/lib/seahorse/client/configuration.rb:162:in `block in apply_options'",
"/var/task/vendor/bundle/ruby/2.5.0/gems/aws-sdk-core-3.72.0/lib/seahorse/client/configuration.rb:161:in `each'",
"/var/task/vendor/bundle/ruby/2.5.0/gems/aws-sdk-core-3.72.0/lib/seahorse/client/configuration.rb:161:in `apply_options'",
"/var/task/vendor/bundle/ruby/2.5.0/gems/aws-sdk-core-3.72.0/lib/seahorse/client/configuration.rb:149:in `build!'",
"/var/task/vendor/bundle/ruby/2.5.0/gems/aws-sdk-core-3.72.0/lib/seahorse/client/base.rb:62:in `build_config'",
"/var/task/vendor/bundle/ruby/2.5.0/gems/aws-sdk-core-3.72.0/lib/seahorse/client/base.rb:19:in `initialize'",
"/var/task/vendor/bundle/ruby/2.5.0/gems/aws-sdk-kinesis-1.20.0/lib/aws-sdk-kinesis/client.rb:273:in `initialize'",
"/var/task/vendor/bundle/ruby/2.5.0/gems/aws-sdk-core-3.72.0/lib/seahorse/client/base.rb:99:in `new'",
```

My dependencies are below:

```
GEM
remote: https://rubygems.org/
specs:
...
aws-eventstream (1.1.0)
aws-partitions (1.343.0)
aws-record (2.4.0)
aws-sdk-dynamodb (~> 1.18)
aws-sdk-core (3.104.1)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-dynamodb (1.37.0)
aws-sdk-core (~> 3, >= 3.71.0)
aws-sigv4 (~> 1.1)
aws-sdk-kinesis (1.26.0)
aws-sdk-core (~> 3, >= 3.99.0)
aws-sigv4 (~> 1.1)
aws-sdk-lambda (1.31.0)
aws-sdk-core (~> 3, >= 3.71.0)
aws-sigv4 (~> 1.1)
aws-sdk-sns (1.20.0)
aws-sdk-core (~> 3, >= 3.71.0)
aws-sigv4 (~> 1.1)
aws-sdk-xray (1.4.0)
aws-sdk-core (~> 3)
aws-sigv4 (~> 1.0)
aws-sigv4 (1.2.1)
aws-eventstream (~> 1, >= 1.0.2)
aws-xray-sdk (0.11.5)
aws-sdk-xray (~> 1.4.0)
multi_json (~> 1)
...

DEPENDENCIES
aws-record
aws-sdk-kinesis
aws-sdk-lambda
aws-sdk-sns
aws-xray-sdk
...
```

Not sure if it's related to https://github.com/aws/aws-xray-sdk-ruby/issues/26 but the fix mentioned here shows the Kinesis service is whitelisted so I'm not sure what exactly is going wrong?
Would i just need to bump my dependencies on the `aws-sdk-*` gems?

Thank you! 🙏

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.