This sample demonstrates Istio's Open Telemetry ALS support.
First, create an otel-collector
backend with simple configuration.
kubectl apply -f otel.yaml
With following configuration, otel-collector will create a grpc receiver on port 4317
, and output to stdout. You can find more details form here.
receivers: otlp: protocols: grpc: http: processors: batch: exporters: logging: loglevel: debug service: pipelines: logs: receivers: [otlp] processors: [batch] exporters: [logging]
Run the following script to update the istio
with demo profile:
istioctl install --set profile=demo -y
Next, add a Telemetry resource that tells Istio to send access logs to the OpenTelemetry collector.
cat <<EOF | kubectl apply -n dubbo-system -f - apiVersion: telemetry.istio.io/v1alpha1 kind: Telemetry metadata: name: mesh-default namespace: dubbo-system spec: accessLogging: - providers: - name: otel EOF
Following doc, start the fortio
and httpbin
services.
Run the following script to request httpbin
from fortio
.
kubectl exec -it $(kubectl get po | grep fortio | awk '{print $1}') -- fortio curl httpbin:8000/ip
Run the following script to checkout ALS output.
kubectl logs $(kubectl get po -n dubbo-system | grep otel | awk '{print $1}') -n dubbo-system
kubectl delete -f otel.yaml kubectl delete telemetry mesh-default -ndubbo-system