-
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
feat(otel-node): add @opentelemetry/instrumentation-kafkajs #570
Conversation
// span 199d7e "manual-parent-span" (3.4ms, SPAN_KIND_INTERNAL) | ||
// -3ms `- span 2da778 "edot-test-topic" (19.6ms, SPAN_KIND_PRODUCER) | ||
// +1ms `- span 6d088b "edot-test-topic" (19.4ms, SPAN_KIND_PRODUCER) | ||
// TODO |
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.
Should this "TODO" be removed?
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.
yes
* under the License. | ||
*/ | ||
|
||
// Usage: node -r @elastic/opentelemetry-node use-kafkajs.js |
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.
nit:
// Usage: node -r @elastic/opentelemetry-node use-kafkajs.js | |
// Usage: node --env-file ../test-services.env -r @elastic/opentelemetry-node use-kafkajs.js |
Perhaps add this, because the KAFKA_HOST
setting is needed for this to work locally.
Eventually we could add the same --env-file ...
usage to the other fixtures, but that is low priority.
// ref: https://kafka.js.org/docs/migration-guide-v2.0.0#producer-new-default-partitioner | ||
KAFKAJS_NO_PARTITIONER_WARNING: '1', |
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.
Thoughts on moving this to the test-services.env?
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.
didn't add it to the env file since is not a mandatory config for kafka tests to work. Actually we're not checking the stdout of the fixture within the test so we can remove it.
// ref: https://kafka.js.org/docs/migration-guide-v2.0.0#producer-new-default-partitioner | ||
KAFKAJS_NO_PARTITIONER_WARNING: '1', | ||
// test specific vars | ||
KAFKA_HOST: 'localhost', |
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.
Should be able to remove this one from here. It is defined in test-services.env.
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.
yes
KAFKAJS_NO_PARTITIONER_WARNING: '1', | ||
// test specific vars | ||
KAFKA_HOST: 'localhost', | ||
KAFKAJS_TOPIC: 'edot-test-topic', |
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.
nit: Can we prefix this with TEST_
? E.g. the same as is done for TEST_ENDPOINT
and TEST_REGION
for the aws-sdk fixtures.
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.
also yes
Closes: #235