I have a Java Spring Boot application instrumented with OpenTelemetry Javaagent. Metrics, logs, and ...
i
I have a Java Spring Boot application instrumented with OpenTelemetry Javaagent. Metrics, logs, and traces are being sent successfully. However, the URL in failed request traces is always displayed as "/**". If I make a request to "/mac-addresse" which is invalid, the trace will show "/**" not /mac-addresse as I expect. Only for valid requests it will show the corresponding URL -> When trying with /mac-addresses it will successfully show /mac-addresses. Any clues?
1
s
However, the URL in failed request traces is always displayed as "/**".
A non-existing endpoint can't be traced because it doesn't exist.
1
i
If I want to protect my website from bots that try multiple requests in order to map my website, how should I do that? Because I can't determine if the wanted URL isn't near a valid one. If I have invalid traces, I can't tell if it is a valid client that misspelled the endpoint by a letter or a bot who wrote something completely different.
As said by Srikanth Chekuri: Traces only show the endpoint URL, so:
Copy code
/*
    /**
    /mac-addresses/{something}/otherthing
    ...
And do not show:
Copy code
/test
    /404error
    /mac-addresses/myrealthing/otherthing
So traces aren't the right type to cover my needs. The load balancer has the information about the URL entered by users. So what you need to do is configure your load balancer to send its logs to SigNoz. I'm using Istio and here is my config:
Copy code
apiVersion: v1
data:
  mesh: |-
    accessLogFile: /dev/stdout
    defaultConfig:
      discoveryAddress: istiod.istio-system.svc:15012
    defaultProviders:
      metrics:
      - prometheus
      - otel
    enablePrometheusMerge: true
    extensionProviders:
    - name: otel
      envoyOtelAls:
        service: <name-service-signoz-otel-collector>.<namespace-signoz-install>.svc.cluster.local
        port: 4317
    rootNamespace: istio-system
    trustDomain: cluster.local
  meshNetworks: 'networks: {}'
1