#support

Troubleshooting Missing Operation Name in Instrumentation

TLDR Sanjiv added code to match service name from automatic instrumentation, but operation name was missing. User resolved the issue, suggesting improvement in documentation.

Powered by Struct AI
2
9mo
Solved
Join the chat
Feb 28, 2023 (9 months ago)
Sanjiv
Photo of md5-914a8b39b82fd99b8ecd985427660deb
Sanjiv
09:02 PM
I added the following code but where “my-service-name” matches the service name from the automatic instrumentation and what appears in SigNoz. However the operation “my-operation-name” never appears anywhere.

        Tracer tracer = GlobalOpenTelemetry.getTracer("my-service-name");

        Span childSpan = tracer.spanBuilder("my-operation-name").setSpanKind(SpanKind.SERVER).startSpan();
        childSpan.setAttribute("foo", "bar");
Mar 01, 2023 (9 months ago)
Sanjiv
Photo of md5-914a8b39b82fd99b8ecd985427660deb
Sanjiv
01:09 AM
I was able to figure this out with a fair amount of difficulty. The docs in this area should be improved