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

MANUAL_KEEP broken with 5.25.0 #4902

Open
SinBirb opened this issue Nov 18, 2024 · 1 comment
Open

MANUAL_KEEP broken with 5.25.0 #4902

SinBirb opened this issue Nov 18, 2024 · 1 comment

Comments

@SinBirb
Copy link

SinBirb commented Nov 18, 2024

Hey, dd-trace version 5.25.0 removed MANUAL_KEEP, and now we are missing a lot of traces.

This seems to be a bug, because the feature still exists in the docs: https://docs.datadoghq.com/tracing/trace_pipeline/ingestion_mechanisms/?tab=java&code-lang=nodejs#force-keep-and-drop

Is this supposed to be deprecated?

@SinBirb
Copy link
Author

SinBirb commented Nov 19, 2024

Maybe it's not clear enough what I mean? We use it like this:

import tracer from "./../utils/tracer";
import { Span } from "dd-trace";
import { MANUAL_KEEP } from "dd-trace/ext/tags";

private keepApmSpan(): void {
        const scope = tracer.scope();

        if (scope) {
            const span = scope.active();

            if (span) {
                const rootSpan = (span.context() as any)._trace.started[0] as Span;

                if (rootSpan) {
                    const tags: Record<string, unknown> = {};

                    tags[MANUAL_KEEP] = true;
                    rootSpan.addTags(tags);
                }
            }
        }
    }

But the spans are not actually kept, Datadog shows no more ingress of these spans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant