#support

Trace Testing with SigNoz and Otel in Kubernetes

TLDR Pradeep asks about trace testing using SigNoz as a backend. Vishal requests examples of desired testing. Pradeep shares code snippets but has not received a solution yet.

Powered by Struct AI
May 22, 2023 (1 week ago)
Pradeep
Photo of md5-27125ecd48e0ba0d4c21f2e438c0cdeb
Pradeep
07:27 AM
Hi
Can we do trace testing using signoz as backend ? or is there any other way to do trace testing after setting up signoz with otel ?
I deployed signoz using helm chart on my kubernetes cluster and I can able to see the traces.
Prashant
Photo of md5-1899629483c7ab1dccfbee6cc2f637b9
Prashant
09:50 AM
cc Vishal
Vishal
Photo of md5-31f2f0cedfc4bc1be85b1ab6bf0b9040
Vishal
10:15 AM
What kind of testing do you want to enable using traces? Can you please give me some examples?
Pradeep
Photo of md5-27125ecd48e0ba0d4c21f2e438c0cdeb
Pradeep
10:20 AM
Okay

Below screenshot I am getting users from my microservice

My tracetest definition file is

type: Test
spec:
  name: Go Get users
  description: "Get users"
  trigger:
    type: http
    httpRequest:
      url: 
      method: GET
      headers:
      - key: Content-Type
        value: application/json
  specs:
    - selector: span[name = "GET /users"]
      assertions:
        - attr:tracetest.span.duration <= 500ms
        - attr:http.status_code = 200
  outputs:
    - name: USER_ID
      selector: span[name = "GET /users"]
      value: attr:http.response.body | json_path '.id'
Image 1 for Okay<br><br>Below screenshot I am getting users from my microservice<br><br>My tracetest definition file is<br><br><pre><code>type: Test
spec:
  name: Go Get users
  description: "Get users"
  trigger:
    type: http
    httpRequest:
      url: <http://go-service.default.svc.cluster.local:6000/users>
      method: GET
      headers:
      - key: Content-Type
        value: application/json
  specs:
    - selector: span[name = "GET /users"]
      assertions:
        - attr:tracetest.span.duration &lt;= 500ms
        - attr:http.status_code = 200
  outputs:
    - name: USER_ID
      selector: span[name = "GET /users"]
      value: attr:http.response.body | json_path '.id'</code></pre>
10:21
Pradeep
10:21 AM
I am getting an error like
Image 1 for I am getting an error like
10:24
Pradeep
10:24 AM
I added tracetest exporter in helm chart config to collector file.

helm template --debug .

my config looks like

and in pipeline

        traces/1:
          exporters:
          - otlp/1
          processors:
          - batch
          receivers:
          - otlp
Image 1 for I added tracetest exporter in helm chart config to  collector file.<br><br>helm template --debug .<br><br>my config looks like<br><br>and in pipeline<br><br><pre><code>        traces/1:
          exporters:
          - otlp/1
          processors:
          - batch
          receivers:
          - otlp</code></pre>
10:31
Pradeep
10:31 AM
https://github.com/MrAzharuddin/go-backend
Golang repo with instrumentation

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
Join Our Community