-
Notifications
You must be signed in to change notification settings - Fork 318
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
Adding Pino Integration-test #2002
Conversation
integration-tests/pino/index.js
Outdated
options.port = process.env.AGENT_PORT | ||
} | ||
|
||
if (process.env.AGENT_URL) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need this if-block at all, since you're not using that option in the tests.
integration-tests/pino/index.js
Outdated
require('dd-trace').init(options) | ||
|
||
const http = require('http') | ||
// eslint-disable-next-line import/no-extraneous-dependencies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment should be unnecessary, since you're using pino.
integration-tests/pino.spec.js
Outdated
}, | ||
stdio: 'pipe', | ||
}) | ||
return curlAndAssertMessage(agent, proc, () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're making an assertion in the 'data'
event handler, but the surrounding function will return before that's validated. You should wait for that directly. Since you're not actually asserting anything about the message itself, you don't really need to so anything in that callback. This should all be done outside that callback.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2002 +/- ##
=======================================
Coverage 84.70% 84.70%
=======================================
Files 237 237
Lines 10147 10147
Branches 33 33
=======================================
Hits 8595 8595
Misses 1552 1552 ☔ View full report in Codecov by Sentry. |
BenchmarksBenchmark execution time: 2024-01-02 11:07:35 Comparing candidate commit 83aacfe in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 516 metrics, 15 unstable metrics. scenario:plugin-q-with-tracer-16
|
3d1b4e1
to
e1444e2
Compare
Overall package sizeSelf size: 5.82 MB Dependency sizes
🤖 This report was automatically generated by heaviest-objects-in-the-universe |
e1444e2
to
5779d7c
Compare
5779d7c
to
83aacfe
Compare
What does this PR do?
Adds integration testing for the Pino library.
Additional Notes
At the moment I'm only testing to ensure that log injection is working. If more testing is needed let me know.