https://signoz.io logo
#support
Title
# support
s

Snehanshu Raj

08/17/2023, 4:24 AM
Hi team, when I am using Signoz tracer to monitor a method in my Python FastAPI application which involves jpype library, there is huge numbr of traces coming up on the UI and also the UI hangs on opening up that particular request. Could anyone help me know why this is happening?
v

Vishal Sharma

08/17/2023, 7:10 AM
How many spans are there? The community edition supports upto 10k spans in a single trace. The enterprise plan has a feature which allows upto 100k spans in a single trace.
s

Snehanshu Raj

08/17/2023, 7:31 AM
@Vishal Sharma 2998 spans coming up. However i have attached traces only to few methods. These many spans showing up when jpype is used. Other cases only the required number of spans show up. Is it normal behaviour or something is wrong from my code end?
v

Vishal Sharma

08/17/2023, 7:32 AM
Can you check if the spans are relevant?
s

Snehanshu Raj

08/17/2023, 7:33 AM
No they are not relevant. they have time spans of 0.01 microseconds.
v

Vishal Sharma

08/17/2023, 7:33 AM
Our enterprise customers do have thousands of spans so depends on your system.
s

Snehanshu Raj

08/17/2023, 7:33 AM
Outside of the main span which is actually required.
v

Vishal Sharma

08/17/2023, 7:36 AM
Are they duplicates? Can you their name and attributes?
s

Snehanshu Raj

08/17/2023, 7:36 AM
If you see this screenshot, the upload span is the only required span, however the POST/ ones are in huge number coming up.
Yes they are duplicates the POST/ ones
v

Vishal Sharma

08/17/2023, 7:38 AM
I didn’t find any relevant github issues on jpype. How did you instrument?
s

Snehanshu Raj

08/17/2023, 7:39 AM
from opentelemetry import trace tracer = trace.get_tracer(name) with tracer.start_as_current_span("file_response"):
v

Vishal Sharma

08/17/2023, 7:39 AM
So you are manually instrumenting?
s

Snehanshu Raj

08/17/2023, 7:39 AM
Yes within each method which i want to be monitored. Usig this. with tracer.start_as_current_span("file_response"):
There is a nested method calls which comes up perfectly as in the screenshot marked with 7, upload.
However i am not able to get why those extra POST spans are showing up.
Also FYI, the API is being run by the command: OTEL_RESOURCE_ATTRIBUTES=service.name=autofill_exports OTEL_EXPORTER_OTLP_ENDPOINT="endpoint" opentelemetry-instrument <followed by the api command>
v

Vishal Sharma

08/17/2023, 9:04 AM
Any reason why you are not using auto instrumentation?
s

Snehanshu Raj

08/17/2023, 9:44 AM
When using auto instrumentation i was not getting spans for individual methods.
Or could you point me to any correct resource?
using auto instrumentation?
https://signoz.io/docs/instrumentation/python/ on following this page i was getting only the endpoint span, and this was too in large number. This did not give the spans for the methods it was calling internally.
@Vishal Sharma if you could answer this?
2 Views