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

Create two bundles: core and rum #24

Merged
merged 4 commits into from
Mar 15, 2019
Merged

Conversation

sdeprez
Copy link
Contributor

@sdeprez sdeprez commented Mar 13, 2019

Add two entry points for two bundles: core (only log) and rum (core + rum). I did a refacto of the configuration (no need for a class) to be able to add configuration specific to the RUM. I also did not want to expose the log endpoints to the user so I made a bundle special for e2e tests.

I also choose to not monitor all the start* methods because it can be tricky to start monitoring when the start monitor itself can fail and that for now we want to know immediately if errors appear here, they are really critical and, arguably, even the customer could want to know about it if the agent does not work at all.

-> Anyway we should discuss about the monitor strategy, we won't be able to do anything that we want 😢.

@sdeprez sdeprez force-pushed the sdeprez/add_rum_and_core_bundles branch from 9423db6 to 49ae6b2 Compare March 13, 2019 18:09
@sdeprez
Copy link
Contributor Author

sdeprez commented Mar 13, 2019

@sdeprez sdeprez requested a review from bcaudan March 13, 2019 18:35
src/entries/common.ts Outdated Show resolved Hide resolved
src/entries/rum.ts Outdated Show resolved Hide resolved
src/entries/rum.ts Show resolved Hide resolved
src/entries/e2e.ts Outdated Show resolved Hide resolved
src/core/configuration.ts Outdated Show resolved Hide resolved
src/entries/tests/core.spec.ts Outdated Show resolved Hide resolved
src/entries/e2e.ts Outdated Show resolved Hide resolved
test/unit/karma.base.conf.js Outdated Show resolved Hide resolved
@@ -2,6 +2,11 @@ import { expect } from 'chai'
import * as request from 'request'
const baseRequest = request.defaults({ baseUrl: 'http://localhost:3000' })

afterEach(async () => {
const logs = await browser.getLogs('browser')
logs.forEach(console.log)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it for debug purpose?
Could we expect to not have browser logs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it's to debug failing tests, otherwise you have zero information from the bundle errors / logs. (For instance I had a SyntaxError on page.html that only appeared when logging that).

Copy link
Contributor

Choose a reason for hiding this comment

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

what do you think of expecting that there is no browser logs?
It would be harder to miss a browser log

src/entries/common.ts Outdated Show resolved Hide resolved
@sdeprez sdeprez merged commit c72a2f9 into master Mar 15, 2019
@sdeprez sdeprez deleted the sdeprez/add_rum_and_core_bundles branch March 15, 2019 13:47
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.

2 participants