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

fix requests to the agent being traced #1299

Merged
merged 1 commit into from
Apr 9, 2021
Merged

fix requests to the agent being traced #1299

merged 1 commit into from
Apr 9, 2021

Conversation

rochdev
Copy link
Member

@rochdev rochdev commented Apr 9, 2021

What does this PR do?

Fix requests to the agent being traced.

Motivation

Fix #1248

@rochdev rochdev added bug Something isn't working integrations labels Apr 9, 2021
@rochdev rochdev added this to the 0.32.0 milestone Apr 9, 2021
@rochdev rochdev requested a review from a team as a code owner April 9, 2021 15:46
@@ -22,7 +22,7 @@ module.exports = {
agent = express()
agent.use(bodyParser.raw({ limit: Infinity, type: 'application/msgpack' }))
agent.use((req, res, next) => {
if (req.body.length === 0) return res.status(200).send()
if (!req.body.length) return res.status(200).send()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why this change?

Copy link
Member Author

@rochdev rochdev Apr 9, 2021

Choose a reason for hiding this comment

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

bodyParser defaults to an empty object when the content type didn't match, which doesn't have a length property.

@codecov
Copy link

codecov bot commented Apr 9, 2021

Codecov Report

Merging #1299 (9bdf57a) into master (6c1847f) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1299   +/-   ##
=======================================
  Coverage   92.57%   92.57%           
=======================================
  Files         150      150           
  Lines        6113     6113           
=======================================
  Hits         5659     5659           
  Misses        454      454           
Impacted Files Coverage Δ
packages/datadog-plugin-http/src/client.js 93.58% <100.00%> (ø)

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 6c1847f...9bdf57a. Read the comment docs.

@rochdev rochdev merged commit b02762c into master Apr 9, 2021
@rochdev rochdev deleted the fix-self-tracing branch April 9, 2021 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working integrations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dd-trace reports its own activity as APM http traces
2 participants