Skip to content

[azure] fix bug causing log splitting to not work properly #950

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2025

Conversation

mattsp1290
Copy link
Member

@mattsp1290 mattsp1290 commented Jun 20, 2025

What does this PR do?

There was a bug in our log forwarder which caused log splitting to not function properly. We were incorrectly assuming we had a field name when we actually had an index.

Motivation

Log splitting was not working no matter what setting were used.

Testing Guidelines

Unit tests added to test this behavior

Additional Notes

Types of changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)
  • This PR passes the unit tests
  • This PR passes the installation tests (ask a Datadog member to run the tests)

@mattsp1290 mattsp1290 requested a review from a team as a code owner June 20, 2025 22:09
@mattsp1290 mattsp1290 requested a review from benjjs June 20, 2025 22:09
@github-actions github-actions bot added the azure label Jun 20, 2025
Comment on lines +650 to +655
return Object.assign({
ddsource: 'azure.datafactory',
ddsourcecategory: 'azure',
service: 'azure',
ddtags: 'forwardername:testFunctionName'
}, x);

Choose a reason for hiding this comment

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

🟠 Code Quality Violation

Prefer object spread over `Object.assign` (...read more)

This rule encourages the use of the object spread syntax over the Object.assign method when creating a new object from an existing one where the first argument is an empty object. This is because the object spread syntax is more concise, easier to read, and can eliminate the need for null checks that are often necessary with Object.assign.

If you need to use Object.assign, make sure that the first argument is not an object literal, as this can easily be replaced with the spread syntax.

View in Datadog  Leave us feedback  Documentation

Copy link

@benjjs benjjs left a comment

Choose a reason for hiding this comment

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

Looks good aside from the code quality recommendations. Thanks for adding the additional tests.

@mattsp1290 mattsp1290 merged commit 283fd42 into master Jun 26, 2025
11 checks passed
@mattsp1290 mattsp1290 deleted the matt.spurlin/AZINTS-3269/fix-log-splitting branch June 26, 2025 14:15
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