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

✨ [RUMF-626] use site configuration and deprecate suffixed bundle #476

Merged
merged 6 commits into from
Aug 12, 2020

Conversation

bcaudan
Copy link
Contributor

@bcaudan bcaudan commented Aug 7, 2020

Motivation

Allow to easily support future datacenters and align configuration parameter with other libraries.

Changes

  • Support site configuration
  • Build new bundle files without suffix: datadog-rum.js and datadog-logs.js
  • Use new bundle files everywhere

Testing

Automated tests


I have gone over the contributing documentation.

@codecov-commenter
Copy link

codecov-commenter commented Aug 7, 2020

Codecov Report

Merging #476 into master will increase coverage by 0.16%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #476      +/-   ##
==========================================
+ Coverage   87.57%   87.73%   +0.16%     
==========================================
  Files          34       34              
  Lines        2116     2112       -4     
  Branches      416      413       -3     
==========================================
  Hits         1853     1853              
+ Misses        263      259       -4     
Impacted Files Coverage Δ
packages/logs/src/buildEnv.ts 100.00% <ø> (ø)
packages/rum/src/buildEnv.ts 100.00% <ø> (ø)
packages/core/src/configuration.ts 83.72% <66.66%> (-0.73%) ⬇️
packages/core/src/init.ts 81.81% <100.00%> (-1.04%) ⬇️
packages/logs/src/loggerSession.ts 95.65% <0.00%> (-4.35%) ⬇️
packages/logs/src/logger.ts 94.11% <0.00%> (-1.18%) ⬇️
packages/rum/src/rum.ts 90.76% <0.00%> (+4.61%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d05cd80...14365f9. Read the comment docs.

@bcaudan bcaudan changed the title ✨ [RUMF-626] add gov DC support ✨ [RUMF-626] add gov datacenter support Aug 7, 2020
@bcaudan bcaudan marked this pull request as ready for review August 7, 2020 13:10
@bcaudan bcaudan requested a review from a team as a code owner August 7, 2020 13:10
consistent with other dd libraries
remove target env notion, staging file will point to prod by default, site configuration will be used to send data to the right intake
@bcaudan bcaudan requested review from a team and glorieux August 12, 2020 11:49
const suffixRegExp = /-(us|eu)/
const env = fileName.match(suffixRegExp)[1]
const newFileName = fileName.replace(suffixRegExp, '')
return `/**\n * ${fileName} IS DEPRECATED, USE ${newFileName} WITH { site: 'datadoghq.${
Copy link
Member

Choose a reason for hiding this comment

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

I fear that a code comment is not enough. What about having a console.warn instead?

Also, https://webpack.js.org/plugins/banner-plugin/ could be used for this purpose.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IMO, adding extra warning is a bit too much, I would do that if we set a date for the removal of the API.

about banner-plugin, since it is not something that we want to maintain, I don't think it worth the effort to change the implementation, wdyt?

Copy link
Member

Choose a reason for hiding this comment

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

Since we don't know how much time we'll need to maintain this, I'd be in favor of having a nicer implementation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd say that if we need to touch it, let's push to remove it instead

Copy link
Member

Choose a reason for hiding this comment

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

Alright

@bcaudan bcaudan changed the title ✨ [RUMF-626] add gov datacenter support ✨ [RUMF-626] use site configuration and deprecate suffixed bundle Aug 12, 2020
@bcaudan bcaudan merged commit fb15580 into master Aug 12, 2020
@bcaudan bcaudan mentioned this pull request Aug 25, 2020
@bcaudan bcaudan deleted the bcaudan/govcloud branch September 8, 2020 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants