<p>We are reviewing Managed Anthos Service Mesh(istio) in GCP, their is no straight forward setup for Lightstep, so we are trying to push traces from envoy to otel collector process and export it to lightstep, the otel deployment config is as below</p>
<pre><code>---

apiVersion: v1
kind: ConfigMap
metadata:
  name: otel-collector-conf
  labels:
    app: opentelemetry
    component: otel-collector-conf
data:
  otel-collector-config: |
    receivers:
      zipkin:
        endpoint: 
    processors:
      batch:
      memory_limiter:
        # 80% of maximum memory up to 2G
        limit_mib: 400
        # 25% of limit up to 2G
        spike_limit_mib: 100
        check_interval: 5s
    extensions:
      zpages: {}
      memory_ballast:
        # Memory Ballast size should be max 1/3 to 1/2 of memory.
        size_mib: 165
    exporters:
      logging:
        loglevel: debug

      otlp:
        endpoint: 10.x.x.19:8184
        insecure: true
        headers:
          &quot;lightstep-access-token&quot;: &quot;xxx&quot;
    service:
      extensions: [zpages, memory_ballast]
      pipelines:
        traces:
          receivers: [zipkin]
          processors: [memory_limiter, batch]
          exporters: [otlp]

---
apiVersion: v1
kind: Service
metadata:
  name: otel-collector
  labels:
    app: opentelemetry
    component: otel-collector
spec:
  ports:
  - name: otlp-grpc # Default endpoint for OpenTelemetry gRPC receiver.
    port: 4317
    protocol: TCP
    targetPort: 4317
  - name: otlp-http # Default endpoint for OpenTelemetry HTTP receiver.
    port: 4318
    protocol: TCP
    targetPort: 4318
  - name: metrics # Default endpoint for querying metrics.
    port: 8888
  - name: zipkin # Default endpoint for OpenTelemetry HTTP receiver.
    port: 9411
    protocol: TCP
    targetPort: 9411
  selector:
    component: otel-collector
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: otel-collector
  labels:
    app: opentelemetry
    component: otel-collector
spec:
  selector:
    matchLabels:
      app: opentelemetry
      component: otel-collector
  minReadySeconds: 5
  progressDeadlineSeconds: 120
  replicas: 1 #TODO - adjust this to your own requirements
  template:
    metadata:
      labels:
        app: opentelemetry
        component: otel-collector
    spec:
      containers:
      - command:
          - &quot;/otelcol&quot;
          - &quot;--config=/conf/otel-collector-config.yaml&quot;
        image: otel/opentelemetry-collector:latest
        name: otel-collector
        resources:
          limits:
            cpu: 1
            memory: 2Gi
          requests:
            cpu: 200m
            memory: 400Mi
        ports:
        - containerPort: 55679 # Default endpoint for ZPages.
        - containerPort: 4317 # Default endpoint for OpenTelemetry receiver.
        - containerPort: 14250 # Default endpoint for Jaeger gRPC receiver.
        - containerPort: 14268 # Default endpoint for Jaeger HTTP receiver.
        - containerPort: 9411 # Default endpoint for Zipkin receiver.
        - containerPort: 8888  # Default endpoint for querying metrics.
        volumeMounts:
        - name: otel-collector-config-vol
          mountPath: /conf
      volumes:
        - configMap:
            name: otel-collector-conf
            items:
              - key: otel-collector-config
                path: otel-collector-config.yaml
          name: otel-collector-config-vol
</code></pre>
<p>Exposing the otel collector service on 9411 and configuring Anthos Mesh to send traces to the service and export it to Ligthstep, the otel pod is all up, but i dont see any traces on lightstep. Infact I'm not certain if the input from envoy is coming into otel, as the logs for otel is empty.</p>
<pre><code>apiVersion: v1
data:
  mesh: |-
    extensionProviders:
    - name: jaeger
      zipkin:
        service: zipkin.istio-system.svc.cluster.local
        port: 9411
    - name: otel
      zipkin:
        service: otel-collector.otel.svc.cluster.local
        port: 9411
</code></pre>
<p>Also deployed a jaegar all in one deployment and sending traces to it, which works fine and i can view traces on the jaegar UI. Not certain on the otel part.
Kindly assist.</p>

Sanjay M. P.
<p>Take a look at this link, <a href="https://istio.io/latest/docs/reference/config/istio.mesh.v1alpha1/#MeshConfig-ExtensionProvider" rel="nofollow noreferrer">https://istio.io/latest/docs/reference/config/istio.mesh.v1alpha1/#MeshConfig-ExtensionProvider</a></p>
<p>I think you should have your config as follows, otel doesn't listen on port 9411 by default:</p>
<pre><code>apiVersion: v1
data:
  mesh: |-
    extensionProviders:
    - name: jaeger
      zipkin:
        service: zipkin.istio-system.svc.cluster.local
        port: 9411
    - name: otel
      opencensus:
        service: otel-collector.otel.svc.cluster.local
        port: 55678
</code></pre>
<p>Tried this out on my cluster today and it works. However, you can only have one tracing tool configured in the the Telemetry resource, so I'm only able to use Jaeger or Otel. That config looks like:</p>
<pre><code>apiVersion: telemetry.istio.io/v1alpha1
kind: Telemetry
metadata:
  name: mesh-default
  namespace: istio-system
spec:
  tracing:
  - providers:
    - name: otel
    randomSamplingPercentage: 100</code></pre>
