-
Notifications
You must be signed in to change notification settings - Fork 4
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
chore: reviewing TODO comments #129
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,6 @@ class ElasticNodeSDK extends NodeSDK { | |
|
||
// Setup & fix some env | ||
setupEnvironment(); | ||
// TODO detect service name | ||
|
||
// - NodeSDK defaults to `TracerProviderWithEnvExporters` if neither | ||
// `spanProcessor` nor `traceExporter` are passed in. | ||
|
@@ -62,7 +61,6 @@ class ElasticNodeSDK extends NodeSDK { | |
processDetectorSync, | ||
// hostDetectorSync is not currently in the OTel default, but may be added | ||
hostDetectorSync, | ||
// TODO cloud/container detectors by default | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. opened #128 for this |
||
], | ||
}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,19 +22,6 @@ const {ElasticNodeSDK} = require('./lib/sdk.js'); | |
|
||
const sdk = new ElasticNodeSDK(); | ||
|
||
// TODO sdk shutdown: also SIGINT? | ||
// TODO sdk shutdown handlers: better log on err | ||
// TODO sdk shutdown: make these handlers configurable? | ||
// - If so, could move these into sdk.js and it could use its logger for logging an error. | ||
// - Note, only want luggite.warn over console.warn if errSerializer gets | ||
// all attributes (console.warn shows more data for ECONNREFUSED) | ||
// TODO sdk shutdown beforeExit: skip this for Lambda (also Azure Fns?) | ||
// TODO sdh shutdown: call process.exit? | ||
// TODO: Whether we have a signal handler for sdk.shutdown() is debatable. It | ||
// definitely *can* change program behaviour. Let's reconsider. | ||
// Note: See https://github.com/open-telemetry/opentelemetry-js/issues/1521 | ||
// for some thoughts on automatic handling to shutdown the SDK. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. moved all this to #127 |
||
process.on('SIGTERM', async () => { | ||
try { | ||
await sdk.shutdown(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,8 +40,6 @@ const testFixtures = [ | |
recs = stdout.trim().split(/\n/g).map(JSON.parse); | ||
}, | ||
checkTelemetry: (t, col) => { | ||
// We expect telemetry like this: | ||
// TODO: waiting for log sending from https://github.com/open-telemetry/opentelemetry-js-contrib/pull/1837 to be in an otel-js-contrib release | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Already have this. Forgot to remove this TODO comment in the last update to this test file. |
||
const spans = col.sortedSpans; | ||
t.equal(spans.length, 1); | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -340,9 +340,6 @@ class TestCollector { | |
}); | ||
}); | ||
|
||
// TODO: for now we do not need any type of sorting | ||
// To do so we need to take into account that each metric has a different | ||
// property depending of the DataPointType (GAUGE, HISTOGRAM, ...) they have | ||
return metrics; | ||
} | ||
|
||
|
@@ -361,7 +358,6 @@ class TestCollector { | |
}); | ||
}); | ||
|
||
// TODO: sorting required? Or is incoming order sufficient? s/logs/sortedLogs/ if actively sorting. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The TODOs removed here didn't add any value. If we need sorting of metrics and logs on the TestCollector, we'll come here to add it. |
||
return logs; | ||
} | ||
} | ||
|
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.
Per https://github.com/open-telemetry/semantic-conventions/blob/main/docs/attributes-registry/service.md
NodeSDK is already handling those MUST requirements. I'd hesitate to diverge from that by looking around in nearby package.json files. We could later add a feature request issue for this if someone wants/needs it.