Exclusions
  • 01 Dec 2021
  • 1 Minute to read
  • PDF

Exclusions

  • PDF

Article Summary

You can configure regex using a pod annotation to ignore the URLs from tracing in the sidecar that is being injected. Add the annotations to the pod spec file.

Example 

apiVersion: apps/v1
kind: Deployment
metadata:
  name: trace-server
  namespace: trace-env
  labels:
    app: trace-server
spec:
  selector:
    matchLabels:
      app: trace-server
  template:
    metadata:
      labels:
        app: trace-server
      annotations:
        proxy.traceable.ai/ignoreMatcher: '[{"url_path":"\/echo\/live"}, {"url_path":"\/user\/[0-9]*\/cart"}]'
    spec:
      containers:
        - name: trace-server
          image: trace-server:latest
          imagePullPolicy: Never
          ports:
            - containerPort: 8090
          env:
          - name: JAVA_TOOL_OPTIONS
            value: "-XX:+HeapDumpOnOutOfMemoryError"

In the above proxy.traceable.ai/ignoreMatcher annotation example:

  • "/echo/live" - Matches the requests for the path "/echo/live" and leaves it out from tracing.
  • "/user/[0-9]*/cart" - Matches the URL, for example, "/user/10/cart and ignores it from tracing.
  • "/mypage\.html" - Matches the page mypage.html from tracing. Make sure to add "\" in the regex to escape the character. 
  • "/product/[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}" - Matches the product UUIDs in the URL.

Was this article helpful?

What's Next