Skip to content

gRPC Prometheus metrics not exposed for Python application in Beyla #2087

Open
@myeongseok-rpls

Description

@myeongseok-rpls

Description:
I’m seeing that gRPC Prometheus metrics from my Python application are not being exposed by Beyla. I changed trace_printer to text for debugging, but no gRPC-related traces appear.

Configuration:

config:
  data:
    trace_printer: disabled
    profile_port: 6060
    routes:
      unmatched: heuristic
    log_level: error
    discovery:
      open_port: "8080,8000,3000,19530"
      services:
        - k8s_namespace: damoa-(personalize-ml-model-server-v2|webview|mobile-web)
          containers_only: true
    attributes:
      kubernetes:
        enable: true
        resource_labels:
          app: ["app"]
          app-version: ["app-version"]
      extra_group_attributes:
        k8s_app_meta: ["app","app-version"]
      select:
        http_client_request_duration_seconds:
          exclude:
            - "k8s.statefulset.name"
            - "k8s.replicaset.name"
            - "k8s.cluster.name"
            - "k8s.daemonset.name"
            - "k8s.deployment.name"
            - "k8s.job.name"
            - "k8s.owner.name"
            - "k8s.cronjob.name"
            - "k8s.pod.uid"
            - "k8s.pod.start.time"
            - "instance"
            - "job"
            - "k8s_node_name"
        http_server_request_duration_seconds:
          exclude:
            - "k8s.statefulset.name"
            - "k8s.replicaset.name"
            - "k8s.cluster.name"
            - "k8s.daemonset.name"
            - "k8s.deployment.name"
            - "k8s.job.name"
            - "k8s.owner.name"
            - "k8s.cronjob.name"
            - "k8s.pod.uid"
            - "k8s.pod.start.time"
            - "instance"
            - "job"
            - "k8s_node_name"
        http_client_request_body_size_bytes:
          exclude: ["*"]
        http_client_response_body_size_bytes:
          exclude: ["*"]
        http_server_request_body_size_bytes:
          exclude: ["*"]
        http_server_response_body_size_bytes:
          exclude: ["*"]
    filter:
      application:
        server_port:
          not_match: "{0,8126}"
        http_route:
          not_match: "/api/{healthcheck,version}"
    network:
      enable: false
    prometheus_export:
      port: 9090
      path: /metrics
      ttl: 1m
      instrumentations:
        - http
        - grpc

preset: application

Expected Behavior:
gRPC server/client metrics should be visible under the /metrics endpoint on port 9090.

Actual Behavior:
No gRPC metrics are exposed. Even after setting trace_printer to text, I don’t see any gRPC-related traces in the logs.

Steps to Reproduce:

Deploy the Python gRPC service with Beyla as a DaemonSet using the configuration above.

Access http://:9090/metrics.

Observe that only HTTP metrics appear; gRPC metrics are missing.

Notes:

trace_printer: text confirms no gRPC traces are captured.

Other HTTP metrics (client/server) are working as expected.

Can someone help diagnose why the gRPC instrumentation isn’t being picked up?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions