Enable Tracing using OpenTelemetry and Zipkin on EnRoute

EnRoute HowTos

Tracing in EnRoute

EnRoute can be configured to generate Traces in Zipkin and OpenTelemetry format. Tracing can be configured using GlobalConfig

GlobalConfig for Zipkin Tracing

Sending traces to zipkin collector is fairly straightforward. We specify the tracer_type as zipkin and provide the service name as <namespace.name>

Additional custom tags can also be sent to zipkin traces

Note that the example below assumes a zipkin collector is running in namespace istio-system with service name zipkin that accepts traces on port 9411

The GlobalConfig that enables tracing is defined of type globalconfig_tracing

    apiVersion: enroute.saaras.io/v1
    kind: GlobalConfig
    metadata:
      name: enroute-globalconfig-tracing
    spec:
      config: |
        {
        "tracing" : {
            "tracer_type" : "zipkin",
            "zipkin_config" : {
              "service_name" : "istio-system.zipkin:9411",
              "overall_sampling" : 100,
              "max_path_length" : 256,
              "protocol" : "h2c",
              "custom_tags" : [ { "tag_name" : "authority_header", "request_header_name" : ":authority" } , { "tag_name" : "path_header", "request_header_name" : ":path" } ]
            }
        }
        }
      name: enroute-globalconfig-tracing
      type: globalconfig_tracing

GlobalConfig for OpenTelemetry Tracing

EnRoute can also be configured to send traces to opentelemtry collector. The tracer_type is set to opentelemetry and service_name is specified in <namespace.name> format

    apiVersion: enroute.saaras.io/v1
    kind: GlobalConfig
    metadata:
      name: enroute-globalconfig-tracing
    spec:
      config: |
        {
        "tracing" : {
            "tracer_type" : "opentelemetry",
            "opentelemetry_config" : {
              "service_name" : "default.simplest-collector:4317"
            }
        }
        }
      name: enroute-globalconfig-tracing
      type: globalconfig_tracing

Traces with EnRoute

EnRoute shows up with the name enroute-ingress