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

Spans with null operation name generated if @NewSpan is used without a value #364

Closed
rlubke opened this issue Jul 25, 2023 · 0 comments · Fixed by #385
Closed

Spans with null operation name generated if @NewSpan is used without a value #364

rlubke opened this issue Jul 25, 2023 · 0 comments · Fixed by #385

Comments

@rlubke
Copy link

rlubke commented Jul 25, 2023

Expected Behavior

Per the javadocs for NewSpan:

The name of the span which will be created. Default is the annotated method's name separated by hyphens.

The code for NewSpanTraceInterceptor has the following logic:

        AnnotationValue<NewSpan> newSpan = context.getAnnotation(NewSpan.class);
        boolean isNew = newSpan != null;
        if (!isNew) {
            return context.proceed();
        }
        String operationName = newSpan.stringValue().orElse(null);

        Tracer.SpanBuilder builder = tracer.buildSpan(operationName);

Actual Behaviour

Instead, spans are generated with a null operation name.

Steps To Reproduce

No response

Environment Information

Micronaut Tracing/Jaeger 5.0.1

Example Application

No response

Version

4.0.0

n0tl3ss added a commit that referenced this issue Aug 25, 2023
n0tl3ss added a commit that referenced this issue Aug 29, 2023
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

Successfully merging a pull request may close this issue.

1 participant