solo-io/solo-docs

tracing docs

Opened this issue · 0 comments

Add notes on using gloo with Zipkin and Jaeger

relevant config shown below

zipkin install

---
apiVersion: v1
kind: Service
metadata:
  name: zipkin
  namespace: default
spec:
  selector:
    app: zipkin
  ports:
  - port: 9411
    name: http
    targetPort: http
  type: NodePort
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: zipkin
  namespace: default
spec:
  replicas: 1
  strategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: zipkin
    spec:
      containers:
      - name: zipkin
        image: openzipkin/zipkin
        imagePullPolicy: Always
        ports:
        - name: http
          containerPort: 9411

gateway spec

...
spec:
  httpGateway:
    plugins:
      httpConnectionManagerSettings:
        tracing:
          verbose: true
...

config map

kind: ConfigMap
metadata:
  name: gateway-proxy-v2-envoy-config
  namespace: gloo-system
apiVersion: v1
data:
  envoy.yaml: |
    tracing:
      http:
        name: envoy.zipkin
        config:
          trace_id_128bit: true
          collector_cluster: tracingcluster
          collector_endpoint: "/api/v1/spans"
          shared_span_context: false
    static_resources:
      clusters:
      - name: tracingcluster
        alt_stat_name: trace_cluster
        connect_timeout: 5.000s
        http2_protocol_options: {}
        upstream_connection_options:
          tcp_keepalive: {}
        type: STRICT_DNS
        load_assignment:
          cluster_name: tracingcluster
          endpoints:
          - lb_endpoints:
            - endpoint:
                address:
                  socket_address:
                    address: zipkin.default.svc.cluster.local
                    port_value: 9411
  • curl cmd
glooctl proxy url
# returns something like: http://35.229.81.32:80
curl --header "x-client-trace-id: 123abc" --header "x-envoy-decorator-operation: optional-category-identifier" http://35.229.81.32:80/abcd

Working with Istio's Jaeger is essentially the same. Just install Istio with Jaeger, and update the tracing cluster's socket_address to refer to the zipkin service that Istio created for Jaeger, which would be this, by default:
address: zipkin.istio-system.svc.cluster.local