Skip to content

Commit 5a5bb88

Browse files
committed
update error handling to use OpenTelemetry.handle_error API
1 parent eceeff6 commit 5a5bb88

File tree

1 file changed

+1
-1
lines changed
  • resources/aws/lib/opentelemetry/resource/detector/aws

1 file changed

+1
-1
lines changed

resources/aws/lib/opentelemetry/resource/detector/aws/lambda.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def detect
3333
# Convert memory size to integer
3434
resource_attributes[RESOURCE::FAAS_MAX_MEMORY] = ENV['AWS_LAMBDA_FUNCTION_MEMORY_SIZE'].to_i if ENV['AWS_LAMBDA_FUNCTION_MEMORY_SIZE']
3535
rescue StandardError => e
36-
OpenTelemetry.logger.debug("Lambda resource detection failed: #{e.message}")
36+
OpenTelemetry.handle_error(exception: e, message: 'Lambda resource detection failed')
3737
return OpenTelemetry::SDK::Resources::Resource.create({})
3838
end
3939

0 commit comments

Comments
 (0)