Show Only Traces in View & Exclude Certain Routes
TLDR Aleksandar wants to show only traces in traces view and exclude certain routes. Ankit confirms the feature is upcoming. Srikanth and vishal-signoz help exclude a healthcheck route using FastAPI.


May 02, 2023 (5 months ago)
Aleksandar
02:39 PMAnkit
03:35 PMThis is upcoming in a month. We are launching a new explorer page with that option
> is it possible to exclude certain routes, as I have healthcheck route which is triggered every few seconds and unnecessarily bloats the view
should be possible. Srikanth can you help?
Aleksandar
03:36 PMAnkit
03:36 PMWhat data that you need to view for traces and not spans? Would be helpful to understand. Aleksandar
Aleksandar
03:37 PM/trace
, so when needed I can see only the traces without the spans, and then when I want to see spans of the specific trace I click on it to open the detailed view (trace details page)Ankit
03:45 PM
Srikanth
04:11 PMAleksandar
04:11 PMSrikanth
04:12 PMby this do you mean root span? since trace is really a bunch of spans.
Aleksandar
04:13 PMAleksandar
04:27 PM/
route, and I’m not sure which value should I set to exclude only that URL and not any other. With value OTEL_PYTHON_EXCLUDED_URLS=/
It excludes all root spans for all urlsvishal-signoz
04:31 PM^/$
It should only match
/
routeAleksandar
04:47 PMvishal-signoz
04:57 PM^/$
is regex to match only /
Can you set
OTEL_PYTHON_FASTAPI_EXCLUDED_URLS="^/$"
Aleksandar
05:01 PMOTEL_PYTHON_FASTAPI_EXCLUDED_URLS
in a few minutes. One thing that crossed my mind from https://opentelemetry-python-contrib.readthedocs.io/en/latest/instrumentation/fastapi/fastapi.html#exclude-lists - it seems like they are not including the trailing slashes in the values, for example they wrote that in order to exclude /healthcheck
route you need to set value OTEL_PYTHON_FASTAPI_EXCLUDED_URLS=healtcheck
which does not include the /
, could that be the problem?Aleksandar
05:24 PMOTEL_PYTHON_FASTAPI_EXCLUDED_URLS
behaving exactly the sameSrikanth
05:42 PM/healthz
or /healthcheck
and exclude it instead of the root URL.Aleksandar
05:47 PMAleksandar
08:50 PM^(https?://)?[^/]+(/)?$
The regex
^/$
would have worked if the url that was passed to the validation function was only relative (/
), but instead its the full URL (<http://server>:port/
) and requires the above regex in order to properly filter out the /
URL.Thanks for the guidance, much appreciated! I love Signoz and will start using it in prod very soon!

SigNoz Community
Indexed 825 threads (61% resolved)
Similar Threads
Extracting Custom Fields as Attributes from Log in SigNoz
Harald wants to have custom fields from their body parsed as attributes in the SigNoz logger. They have tried implementing suggestions from nitya-signoz and Prashant, but the issue remains unsolved due to a potential race condition encountered while executing the code. They have provided a full example using Kind for further assistance.



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.
Parsing log entry and extracting fields with OTEL
Syed needed help parsing a log entry and extracting fields using OTEL. nitya-signoz provided guidance and the correct configurations, resolving the issue.


Gauge Metrics Not Publishing in Kotlin App with Signoz
subrat faced issues publishing gauge metrics with a Kotlin application using Signoz. Srikanth asked for logs but no useful information was found. subrat seeks clarification on the architecture, but the issue remains unresolved.
Issues with SigNoz Setup and Data Persistence in AKS
Vaibhavi experienced issues setting up SigNoz in AKS, and faced data persistence issues after installation. Srikanth provided guidance on ClickHouse version compatibility and resource requirements, helping Vaibhavi troubleshoot and resolve the issue.