Skip to content
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

🐛 [RUM-97] Sanitize tags parameter in configuration #2744

Merged

Conversation

RomanGaignault
Copy link
Contributor

@RomanGaignault RomanGaignault commented May 6, 2024

Motivation

Setting a non-string value for the customer provided tags init option causes the SDK to fail silently.

Changes

Add validation to ensure that the tags parameters are properly defined as strings.

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

@RomanGaignault RomanGaignault marked this pull request as ready for review May 6, 2024 12:44
@RomanGaignault RomanGaignault requested a review from a team as a code owner May 6, 2024 12:44
packages/core/src/domain/configuration/configuration.ts Outdated Show resolved Hide resolved
Comment on lines 147 to 148
if (initConfiguration.version && typeof initConfiguration.version !== 'string') {
display.error('Version must be defined as a string')
Copy link
Contributor

Choose a reason for hiding this comment

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

💭 thought: ‏Since we are completely blind on those kind of execution issues, it could worth planning some reflexions around it to see if we could do something better

Copy link

cit-pr-commenter bot commented May 7, 2024

Bundles Sizes Evolution

📦 Bundle Name Base Size Local Size 𝚫 𝚫% Status
Rum 157.60 KiB 157.78 KiB 184 B +0.11%
Logs 56.29 KiB 56.47 KiB 184 B +0.32%
Rum Slim 104.09 KiB 104.27 KiB 184 B +0.17%
Worker 25.21 KiB 25.21 KiB 0 B 0.00%
🚀 CPU Performance
Action Name Base Average Cpu Time (ms) Local Average Cpu Time (ms) 𝚫
adderror 0.030 0.032 0.002
addaction 0.014 0.015 0.001
logmessage 0.005 0.005 0.000
startview 0.804 0.890 0.086
startstopsessionreplayrecording 0.762 1.078 0.316
addtiming 0.001 0.001 0.000
addglobalcontext 0.001 0.001 0.000

@RomanGaignault RomanGaignault changed the title 🐛 [RUM-97] Sanitize version parameter in configuration 🐛 [RUM-97] Sanitize tags parameter in configuration May 7, 2024
@RomanGaignault
Copy link
Contributor Author

/to-staging

1 similar comment
@RomanGaignault
Copy link
Contributor Author

/to-staging

@dd-devflow
Copy link

dd-devflow bot commented May 14, 2024

🚂 Branch Integration: starting soon, merge in < 0s

Commit 5663ef942a will soon be integrated into staging-20.

This build is going to start soon! (estimated merge in less than 0s)

Use /to-staging -c to cancel this operation!

@dd-devflow
Copy link

dd-devflow bot commented May 14, 2024

❌ Branch Integration: failure

PR already in the queue with status in_progress

If you need support, contact us on Slack #devflow with those details!

dd-mergequeue bot added a commit that referenced this pull request May 14, 2024
…eter-configuration into staging-20

Co-authored-by: roman.gaignault <roman.gaignault@datadoghq.com>
@dd-devflow
Copy link

dd-devflow bot commented May 14, 2024

🚂 Branch Integration: This commit was successfully integrated

Commit 5663ef942a has been merged into staging-20 in merge commit 24392cfaf7.

Check out the triggered pipeline on Gitlab 🦊

@RomanGaignault RomanGaignault merged commit 05e1457 into main May 14, 2024
21 checks passed
@RomanGaignault RomanGaignault deleted the roman.gaignault/sanitize-version-parameter-configuration branch May 14, 2024 13:22
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.

None yet

3 participants