#support

Filling in Method for Traces in Go Instrumentation

TLDR Timothy asked about filling in the method for traces in Go. vishal-signoz identified a workaround by changing the spankind to Internal, and shared a PR for the fix.

Powered by Struct AI
18
9mo
Solved
Join the chat
Feb 23, 2023 (9 months ago)
Timothy
Photo of md5-f930fdb99fd46477205fa1201164ea50
Timothy
05:39 PM
How do I fill in the method for my traces? I thought it was just the http.method tag but that seems to be set already
Image 1 for How do I fill in the method for my traces? I thought it was just the http.method tag but that seems to be set alreadyImage 2 for How do I fill in the method for my traces? I thought it was just the http.method tag but that seems to be set already
Ankit
Photo of md5-dbe7088320fe1d922707613e02f3420d
Ankit
06:15 PM
It should be there cc: vishal-signoz
Timothy
Photo of md5-f930fdb99fd46477205fa1201164ea50
Timothy
06:18 PM
I should add that this is outgoing http request, incoming requests work correctly. Also this is go instrumentation and I am using the net/http opentelemetry contribution
Ankit
Photo of md5-dbe7088320fe1d922707613e02f3420d
Ankit
06:23 PM
noted...it should not matter. If a span has http.method in span attributes, it should be shown at the column in trace filter page too IMO
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
06:26 PM
Timothy Is it the same span?
Timothy
Photo of md5-f930fdb99fd46477205fa1201164ea50
Timothy
06:29 PM
vishal-signoz Yes the span that does not have the method displayed also has the tag http.method
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
06:33 PM
Can you please share response of getFilteredSpans API, it can be checked from network tab in browser dev console?
You can mask sensitive data.
Timothy
Photo of md5-f930fdb99fd46477205fa1201164ea50
Timothy
06:44 PM
06:47
Timothy
06:47 PM
{"timestamp":"2023-02-23T18:12:50.441997003Z","spanID":"4814d1557f673028","traceID":"606ab4ab46b4d0b4a101007573ca5d61","serviceName":"switch-manager-otel-dev-switch-manager","operation":"/prm-otel/switch-mgmt/switches/mac_address/{mac-address}/associate","durationNano":8651989367,"HttpMethod":"","method":"","statusCode":"200","RPCMethod":""}

This is the issue span
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
06:49 PM
Can you please send response that you receive when you open trace detail page by clicking on this span?
Timothy
Photo of md5-f930fdb99fd46477205fa1201164ea50
Timothy
06:53 PM
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
07:04 PM
Timothy By analysing the data I think this span records an external span and span kind is client.
More details on opentelemetry spec: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#spankind

We are not recording this as normal http method and instead store it as external http method and thus not showing in the table.

Please create an issue in public repo we will investigate it further and fix it.

cc: Ankit
Timothy
Photo of md5-f930fdb99fd46477205fa1201164ea50
Timothy
07:07 PM
okay I can do that, do you think changing the span kind will resolve the issue?
07:23
Timothy
07:23 PM
By changing the spankind to Internal it works correctly
Feb 24, 2023 (9 months ago)
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
04:25 AM
Yes Timothy
Did you manually instrument the app? Or using auto instrumentation?
Timothy
Photo of md5-f930fdb99fd46477205fa1201164ea50
Timothy
02:52 PM
I used the net/http library to instrument our Client
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
04:20 PM
Ok, you don’t need to change spanKind.
We will merge a fix on this soon. (Here’s the PR: https://github.com/SigNoz/signoz-otel-collector/pull/105)
For now you can change the spankind.

SigNoz Community

Built with ClickHouse as datastore, SigNoz is an open-source APM to help you find issues in your deployed applications & solve them quickly | Knowledge Base powered by Struct.AI

Indexed 1023 threads (61% resolved)

Join Our Community

Similar Threads

Issues with Signoz 10.2: Grouping, Missing Traces, and Capturing Requests

Anil reported issues with Signoz 10.2, including grouping, missing traces, and capturing requests. Srikanth suggested upgrading to a newer version. The issue was resolved after upgrading the node version to 18 and additional clarifications were provided.

31
7mo
Solved

Troubleshooting SigNoz Auto-Instrumentation Configuration

igor is having trouble configuring auto-instrumentation for Java applications using SigNoz, with traces not appearing in the SigNoz UI. Prashant advises to check logs of the otel sidecar, use service name for endpoint, verify supported libraries, and test with telemetrygen. However, the issue still persists.

34
8mo

Issue with Signoz Tracer on Python FastAPI Application

Snehanshu is experiencing an issue with the Signoz tracer on a Python FastAPI application which involves a large number of irrelevant spans. vishal-signoz suggested verifying the relevance of these spans and questioned about the type of instrumentation used by Snehanshu.

23
3mo

Headers in Monitoring HTTP Endpoints & Otel-Collector Error

Rohit asks about providing headers in monitoring HTTP endpoints and reports errors in otel-collector logs. Srikanth mentions headers are unsupported and requires more investigation for errors.

7
9mo

Resolving Signoz Query Service Error

Einav encountered an error related to a missing table in the Signoz service which was preventing data visibility in the UI. Srikanth guided them to restart specific components and drop a database table, which resolved the issue.

17
3mo
Solved