Skip to content

feat: node transports #1414

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 7 commits into from
Jun 28, 2018
Merged

feat: node transports #1414

merged 7 commits into from
Jun 28, 2018

Conversation

HazAT
Copy link
Member

@HazAT HazAT commented Jun 26, 2018

No description provided.

@HazAT HazAT self-assigned this Jun 26, 2018
@HazAT HazAT requested a review from kamilogorek as a code owner June 26, 2018 14:57
@HazAT HazAT force-pushed the feature/node-transport branch from 01be670 to bafef7c Compare June 26, 2018 15:19
import { supportsFetch } from '@sentry/utils/supports';
import { Raven } from './raven';
import { FetchTransport, XHRTransport } from './transports';

/**
* Configuration options for the Sentry Browser SDK.
* @see BrowserClient for more information.
* @see BrowserClient afor more information.
Copy link
Contributor

Choose a reason for hiding this comment

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

afor

@@ -27,3 +29,6 @@ export { init } from './sdk';

import * as Integrations from './integrations';
export { Integrations };

import * as Transports from './transports';
export { Transports };
Copy link
Contributor

Choose a reason for hiding this comment

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

We can make it export { Integrations, Transports }; in one call.

@@ -25,6 +25,12 @@ export class FetchTransport extends BaseTransport {
: '') as ReferrerPolicy,
};

return (global as Window).fetch(this.url, defaultOptions);
const response = await (global as Window).fetch(this.url, defaultOptions);
Copy link
Contributor

Choose a reason for hiding this comment

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

It'll break if fetch throws. We should put it in try/catch clause I guess

Copy link
Contributor

Choose a reason for hiding this comment

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

Or will async wrap it in reject call? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

async handles everything 💪

@codecov-io
Copy link

codecov-io commented Jun 27, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@3a0ec5d). Click here to learn what that means.
The diff coverage is 90.81%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #1414   +/-   ##
=========================================
  Coverage          ?   87.15%           
=========================================
  Files             ?       35           
  Lines             ?      825           
  Branches          ?      133           
=========================================
  Hits              ?      719           
  Misses            ?       97           
  Partials          ?        9
Impacted Files Coverage Δ
packages/node/src/raven.ts 100% <ø> (ø)
packages/node/src/integrations/http.ts 54.9% <100%> (ø)
packages/node/src/client.ts 100% <100%> (ø)
packages/core/test/mocks/backend.ts 100% <100%> (ø)
packages/node/src/index.ts 100% <100%> (ø)
packages/node/src/transports/index.ts 100% <100%> (ø)
packages/core/src/base.ts 98.82% <100%> (ø)
packages/node/src/backend.ts 89.58% <83.33%> (ø)
packages/node/src/transports/base.ts 89.74% <89.74%> (ø)
packages/node/src/transports/http.ts 90% <90%> (ø)
... and 1 more

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 3a0ec5d...8ba527c. Read the comment docs.

@HazAT HazAT changed the title [WIP] feat: node transports feat: node transports Jun 27, 2018
@kamilogorek
Copy link
Contributor

NOTE: Investigate "endless loop with emitWrapper"

@HazAT HazAT merged commit f4cd60d into master Jun 28, 2018
@HazAT HazAT deleted the feature/node-transport branch June 28, 2018 06:31
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.

3 participants