Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross processes context propagation not working in the getting started doc #698

Open
danhngo-lx opened this issue Feb 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@danhngo-lx
Copy link

danhngo-lx commented Feb 29, 2024

Describe the bug

I deployed the emojivoto services to my K8s cluster. Then tried to play around with the web service. I found out that the cross processes context propagation is not working. Here's the trace of the api leaderboard:
image

There're only spans for the emojivoto-web service. No spans for other services.

Environment

To Reproduce

Steps to reproduce the behavior:

  1. Deploy emojivoto as in https://github.com/open-telemetry/opentelemetry-go-instrumentation/tree/main/docs/getting-started
  2. Access the web service, vote an emoji, go back and forth between the leaderboard page
  3. Search for the trace of emojivoto-web service, operation name /emojivoto.v1.VotingService/Results
  4. Click on a trace

Expected behavior

  • Trace of leaderboard api has spans of other services such as emojivoto-voting, emojivoto-emoji.

Additional context

Here's my emojivoto-instrumented.yaml file:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: emoji
  namespace: tracing
  labels:
    app.kubernetes.io/name: emoji
    app.kubernetes.io/part-of: emojivoto
    app.kubernetes.io/version: v11
spec:
  replicas: 1
  selector:
    matchLabels:
      app: emoji-svc
      version: v11
  template:
    metadata:
      labels:
        app: emoji-svc
        version: v11
    spec:
      serviceAccountName: emoji
      shareProcessNamespace: true
      terminationGracePeriodSeconds: 0
      containers:
        - env:
            - name: GRPC_PORT
              value: "8080"
            - name: PROM_PORT
              value: "8801"
          image: docker.l5d.io/buoyantio/emojivoto-emoji-svc:v11
          name: emoji-svc
          ports:
            - containerPort: 8080
              name: grpc
            - containerPort: 8801
              name: prom
          resources:
            requests:
              cpu: 100m
        - name: emojivoto-emoji-instrumentation
          image: otel/autoinstrumentation-go
          imagePullPolicy: IfNotPresent
          env:
            - name: OTEL_GO_AUTO_TARGET_EXE
              value: /usr/local/bin/emojivoto-emoji-svc
            - name: OTEL_EXPORTER_OTLP_ENDPOINT
              value: "http://jaeger:4318"
            - name: OTEL_SERVICE_NAME
              value: "emojivoto-emoji"
            # - name: OTEL_PROPAGATORS
            #   value: b3multi
          securityContext:
            runAsUser: 0
            privileged: true
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: voting
  namespace: tracing
  labels:
    app.kubernetes.io/name: voting
    app.kubernetes.io/part-of: emojivoto
    app.kubernetes.io/version: v11
spec:
  replicas: 1
  selector:
    matchLabels:
      app: voting-svc
      version: v11
  template:
    metadata:
      labels:
        app: voting-svc
        version: v11
    spec:
      serviceAccountName: voting
      shareProcessNamespace: true
      terminationGracePeriodSeconds: 0
      containers:
        - env:
            - name: GRPC_PORT
              value: "8080"
            - name: PROM_PORT
              value: "8801"
          image: docker.l5d.io/buoyantio/emojivoto-voting-svc:v11
          name: voting-svc
          ports:
            - containerPort: 8080
              name: grpc
            - containerPort: 8801
              name: prom
          resources:
            requests:
              cpu: 100m
        - name: emojivoto-voting-instrumentation
          image: otel/autoinstrumentation-go
          imagePullPolicy: IfNotPresent
          env:
            - name: OTEL_GO_AUTO_TARGET_EXE
              value: /usr/local/bin/emojivoto-voting-svc
            - name: OTEL_EXPORTER_OTLP_ENDPOINT
              value: "http://jaeger:4318"
            - name: OTEL_SERVICE_NAME
              value: "emojivoto-voting"
            # - name: OTEL_PROPAGATORS
            #   value: b3multi
          securityContext:
            runAsUser: 0
            privileged: true
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: web
  namespace: tracing
  labels:
    app.kubernetes.io/name: web
    app.kubernetes.io/part-of: emojivoto
    app.kubernetes.io/version: v11
spec:
  replicas: 1
  selector:
    matchLabels:
      app: web-svc
      version: v11
  template:
    metadata:
      labels:
        app: web-svc
        version: v11
    spec:
      serviceAccountName: web
      shareProcessNamespace: true
      terminationGracePeriodSeconds: 0
      containers:
        - env:
            - name: WEB_PORT
              value: "8080"
            - name: EMOJISVC_HOST
              value: emoji-svc.tracing:8080
            - name: VOTINGSVC_HOST
              value: voting-svc.tracing:8080
            - name: INDEX_BUNDLE
              value: dist/index_bundle.js
          image: docker.l5d.io/buoyantio/emojivoto-web:v11
          name: web-svc
          ports:
            - containerPort: 8080
              name: http
          resources:
            requests:
              cpu: 100m
        - name: emojivoto-web-instrumentation
          image: otel/autoinstrumentation-go
          imagePullPolicy: IfNotPresent
          env:
            - name: OTEL_GO_AUTO_TARGET_EXE
              value: /usr/local/bin/emojivoto-web
            - name: OTEL_EXPORTER_OTLP_ENDPOINT
              value: "http://jaeger:4318"
            - name: OTEL_SERVICE_NAME
              value: "emojivoto-web"
            # - name: OTEL_PROPAGATORS
            #   value: b3multi
          securityContext:
            runAsUser: 0
            privileged: true
@danhngo-lx danhngo-lx added the bug Something isn't working label Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant