Hi Team, need some help on how to integrate the DB...
# support
h
Hi Team, need some help on how to integrate the DB and external calls tracing.
@Ashu?
a
Can you elaborate on what you're facing @Himanshu Jain ?
h
Need to trace the DB and external calls, not able to find proper documentation for GoLang and Python
a
It should capture this automatically. @Srikanth Chekuri would you have any insights to share on this?
s
Are you sure you are making the calls to DB/External service from this service? What client libraries are you using?
h
yes I made a few calls to DB and external, using algolia and sqlalchemy
s
Can you show a sample trace with an external call and a DB call? Are they working fine?
h
message has been deleted
s
There are no external spans or DB calls, that’s why you are not seeing anything on the services page. How did you instrument the application?
h
I followed this documentation: https://signoz.io/docs/instrumentation/golang/
s
That example only uses the gin instrumentation library to show the capabilities. You need to add the additional instrumentation to get complete visibility. Here are some instrumentations supported https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/instrumentation#instrumentation-packages. There may be additional libraries available provided by individuals.
You are probably using the
net/http
for external calls. So please make sure that is enabled. And you also mentioned sqlalchemy. It’s a python library, right? Do you have the same service written in two languages? DB calls from different service are shown on their own page and tab.
h
There are 2 different services, one in Go and other is python both uses external and DB calls
s
Alright, just make sure instrumentation is done completely (you would see a trace with more than one span) and DB/External calls should show up.
h
Got it I will add the additional instrumentation, can you share the link of popular instrumentation in python?
s
In Python, you can get everything out of the box working in most cases with auto-instrumentation some guides here https://signoz.io/docs/instrumentation/python/ but here is the list of supported instrumentations https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation#readme.
h
Hi @Srikanth Chekuri We added the instrumentations for golang as we last discussed but the traces are not coming fully for the errors also. How should we go about it?
cc @Shivvinay Kanswal
s
You are probably doing something wrong. What all were you expecting and did you make sure that they are instrumented?
h
See in this particular case we got full instrumentation of the req with one of the span having error but we are not able to see the stack trace of the error
s
Select the error span and then click on events
h
Events are empty
s
Was there an exception/error expected? Some spans are marked error even when the stats code is 5xx so it could not be the same as an error with a stack trace.
h
Yes 5xx is an error code and we want to see the trace to that
s
You should look at the instrumentation documentation to see if that is supported or not.
It doesn’t currently add errors as events for 5xx, so nothing in SigNoz UI shows up under that tab otherwise it should work fine.
h
Got it, so we need to push the errors and exceptions separately, right?
s
Yes