Skip to content

add http request + test utilities#2

Merged
rochdev merged 4 commits intomasterfrom
request
Jan 26, 2018
Merged

add http request + test utilities#2
rochdev merged 4 commits intomasterfrom
request

Conversation

@rochdev
Copy link
Copy Markdown
Member

@rochdev rochdev commented Jan 24, 2018

This PR adds a platform module to abstract away Node specific code. This is so that other platforms can eventually be supported, such as browsers and vert.x. This first implementation includes a request method to make HTTP requests to the agent. It is very minimal in nature on purpose since it has a limited scope.

Also included are improvements to the test setup and the inclusion of additional test utilities.

@rochdev rochdev requested a review from palazzem January 24, 2018 22:28
@palazzem palazzem added the core label Jan 25, 2018
@palazzem palazzem added this to the 0.1.0 milestone Jan 25, 2018
Comment thread index.js
module.exports = {
Tracer: DatadogTracer
}
platform.use(node)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

Comment thread src/platform/node/index.js Outdated
request: function (options, callback) {
options = assign({
headers: {},
timeout: 5000
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we can tweak this value, but in general the timeout should be lower

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Totally agree. I started with a very high value to be safe. Would you rather change it to something like 1 or 2 seconds?

@rochdev rochdev merged commit 40c8a23 into master Jan 26, 2018
@rochdev rochdev deleted the request branch January 26, 2018 22:10
paullegranddc added a commit that referenced this pull request May 3, 2021
alrosot pushed a commit to alrosot/dd-trace-js that referenced this pull request May 20, 2021
tlhunter pushed a commit that referenced this pull request Sep 29, 2022
BridgeAR added a commit that referenced this pull request Jan 5, 2026
BridgeAR added a commit that referenced this pull request Jan 5, 2026
@dd-octo-sts dd-octo-sts Bot mentioned this pull request Jan 12, 2026
dd-octo-sts Bot pushed a commit that referenced this pull request Jan 12, 2026
nina9753 pushed a commit that referenced this pull request Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants