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

Jaeger exporter keeps program open indefinitely #712

Closed
dyladan opened this issue Jan 21, 2020 · 0 comments · Fixed by #715
Closed

Jaeger exporter keeps program open indefinitely #712

dyladan opened this issue Jan 21, 2020 · 0 comments · Fixed by #715
Assignees
Labels
bug Something isn't working

Comments

@dyladan
Copy link
Member

dyladan commented Jan 21, 2020

Please answer these questions before submitting a bug report.

What version of OpenTelemetry are you using?

0.3.2

What version of Node are you using?

12, 10, 8

What did you do?

If possible, provide a recipe for reproducing the error.

const opentelemetry = require('../../packages/opentelemetry-core');
const { NodeTracerRegistry } = require('../../packages/opentelemetry-node');
const { SimpleSpanProcessor } = require('../../packages/opentelemetry-tracing');
const { JaegerExporter } = require('../../packages/opentelemetry-exporter-jaeger');

const registry = new NodeTracerRegistry({
    plugins: {
        ioredis: {
            enabled: true,
            path: path.join(__dirname, "../../packages/opentelemetry-plugin-ioredis"),
        }
    }
});

registry.addSpanProcessor(new SimpleSpanProcessor(new JaegerExporter({
    serviceName: 'ioredis-example',
})));

// Initialize the OpenTelemetry APIs to use the BasicTracerRegistry bindings
opentelemetry.initGlobalTracerRegistry(registry);

const Redis = require("ioredis");
const redis = new Redis();

async function main() {
    await redis.set("foo", "bar");
	await redis.quit();
}

main()

What did you expect to see?

Program exits after redis command

What did you see instead?

Program continues to run

Additional context

Jaeger client uses a UDP socket to communicate with Jaeger. After one span is sent, it appears this connection stays open for an undefined length of time. Unref'ing the socket solves the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant