Skip to content

Conversation

@api-clients-generation-pipeline
Copy link
Contributor

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Feb 20, 2025

Datadog Report

Branch report: datadog-api-spec/generated/3593
Commit report: ccb047b
Test service: datadog-api-client-ruby

✅ 0 Failed, 1171 Passed, 1814 Skipped, 1m 56.28s Total Time

Comment on lines +16 to +18
sources: [
"dd.span_id",
],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Quality Violation

Consider using the %W syntax instead (...read more)

The rule "Prefer %w to the literal array syntax" is a Ruby style guideline that encourages the use of %w notation instead of the traditional array syntax when defining arrays of strings. This rule is part of the Ruby community's efforts to promote readability and simplicity in Ruby code.

This rule is important because it helps to keep the code concise and easy to read. The %w notation allows you to define an array of strings without having to use quotes and commas. This can make the code cleaner and easier to understand, especially when dealing with large arrays.

To follow this rule, replace the traditional array syntax with the %w notation. For example, instead of writing ['foo', 'bar', 'baz'], you should write %w[foo bar baz]. This will create the same array, but in a more readable and concise way. By following this rule, you can help to make your Ruby code cleaner and easier to understand.

View in Datadog  Leave us feedback  Documentation

end

if attributes.key?(:'sources')
if (value = attributes[:'sources']).is_a?(Array)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Quality Violation

Consider using Array() to ensure the type is that of an array (...read more)

The rule "Use Array() to ensure your variable is an array" is important for ensuring your code behaves as expected, regardless of the type of data it receives. It is common in Ruby to need to iterate through an array of items. However, if the variable is not an array, this can lead to unexpected behavior or errors.

The Array() method in Ruby is a Kernel method that converts its argument to an Array. If the argument is already an Array, it returns the argument. If the argument is nil, it returns an empty Array. This can be used to ensure that a variable is an array before trying to iterate over it, preventing potential errors or unexpected behavior.

By using Array(foos), you can ensure that foos is an array before you try to iterate over it with each. This prevents the need to check if foos is an array with foos.is_a?(Array) and makes your code cleaner and easier to understand.

View in Datadog  Leave us feedback  Documentation

@api-clients-generation-pipeline api-clients-generation-pipeline bot changed the title [LOGSAC-840] Add support for span id remapper in logs pipelines preprocessors Add support for span id remapper in logs pipelines processors Feb 21, 2025
@api-clients-generation-pipeline api-clients-generation-pipeline bot force-pushed the datadog-api-spec/generated/3593 branch from 73cf1d4 to 500aee5 Compare February 21, 2025 15:28
@api-clients-generation-pipeline api-clients-generation-pipeline bot force-pushed the datadog-api-spec/generated/3593 branch from 500aee5 to 478bd89 Compare February 21, 2025 18:17
@api-clients-generation-pipeline api-clients-generation-pipeline bot merged commit 420b51a into master Feb 21, 2025
15 checks passed
@api-clients-generation-pipeline api-clients-generation-pipeline bot deleted the datadog-api-spec/generated/3593 branch February 21, 2025 18:55
github-actions bot pushed a commit that referenced this pull request Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants