Skip to content

samplingFraction not working #8282

@fe-ax

Description

@fe-ax

Description:
Traces are not being sent out when using 100:100 samplingFraction, but are when using 100% samplingRate. Neither working when setting 50:100.

Repro steps:
Set EnvoyProxy object to nominator 100 and denominator 100:

YAML config of EnvoyProxy
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: EnvoyProxy
metadata:
  labels:
    argocd.argoproj.io/instance: envoy-gateway
  name: private
  namespace: envoy-gateway
spec:
  logging:
    level:
      default: info
  provider:
    kubernetes:
      envoyDeployment:
        container:
          image: ...envoyproxy/envoy:v1.34.2
          resources:
            limits:
              cpu: 500m
              memory: 200Mi
            requests:
              cpu: 500m
              memory: 200Mi
        name: envoy-private
        pod:
          affinity:
            podAntiAffinity:
              requiredDuringSchedulingIgnoredDuringExecution:
                - labelSelector:
                    matchLabels:
                      app.kubernetes.io/instance: envoy-private
                  topologyKey: kubernetes.io/hostname
          labels:
            app.kubernetes.io/instance: envoy-private
          topologySpreadConstraints:
            - labelSelector:
                matchLabels:
                  app.kubernetes.io/instance: envoy-private
              maxSkew: 1
              topologyKey: topology.kubernetes.io/zone
              whenUnsatisfiable: ScheduleAnyway
        strategy:
          rollingUpdate:
            maxSurge: 25%
            maxUnavailable: 1
          type: RollingUpdate
      envoyHpa:
        maxReplicas: 20
        metrics:
          - resource:
              name: cpu
              target:
                averageUtilization: 60
                type: Utilization
            type: Resource
          - resource:
              name: memory
              target:
                averageUtilization: 60
                type: Utilization
            type: Resource
        minReplicas: 3
      envoyPDB:
        maxUnavailable: 1
      envoyService:
        externalTrafficPolicy: Local
        name: envoy-private
        type: ClusterIP
    type: Kubernetes
  telemetry:
    tracing:
      customTags:
        envoy:
          literal:
            value: private
          type: Literal
        k8s.namespace.name:
          environment:
            defaultValue: envoy-gateway
            name: ENVOY_GATEWAY_NAMESPACE
          type: Environment
        k8s.pod.name:
          environment:
            defaultValue: '-'
            name: ENVOY_POD_NAME
          type: Environment
        provider:
          literal:
            value: otel
          type: Literal
      provider:
        host: alloy.alloy.svc
        port: 4317
        type: OpenTelemetry
      samplingFraction:
        denominator: 100
        numerator: 100

Environment:
Envoy: 1.34.2
Envoy Gateway: 1.6.3
Alloy: 1.12.2
Kubernetes: 1.33.7
CRDS envoy: 1.6.3
CRDS gateway: 1.4.1 bundle

Logs:
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions