envoy: Kafka Broker filter is not generating stats properly

Title: Kafka Broker filter is not generating stats properly

Description: I have configured envoy with this:

static_resources:
  listeners:
  - address:
      socket_address:
        address: 0.0.0.0 # Host that Kafka clients should connect to.
        port_value: 1999  # Port that Kafka clients should connect to.
    filter_chains:
    - filters:
      - name: envoy.filters.network.kafka_broker
        typed_config:
          "@type": type.googleapis.com/envoy.extensions.filters.network.kafka_broker.v3.KafkaBroker
          stat_prefix: kafka_proxy
      - name: envoy.filters.network.tcp_proxy
        typed_config:
          "@type": type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy
          stat_prefix: tcp
          cluster: kafka_cluster
  clusters:
  - name: kafka_cluster
    connect_timeout: 0.25s
    type: strict_dns
    lb_policy: round_robin
    load_assignment:
      cluster_name: some_service
      endpoints:
        - lb_endpoints:
          - endpoint:
              address:
                socket_address:
                  address: ******** # Kafka broker's host
                  port_value: 19092 # Kafka broker's port.

admin:
  address:
    socket_address:
      address: 0.0.0.0
      port_value: 8001

Then I run the following command to create a new topic:

bin/kafka-topics.sh --command-config ../kf-notls.properties --create --topic sample7 --partitions 1 --replication-factor 1 --bootstrap-server 127.0.0.1:1999

Here kf-notls.properties contains:

security.protocol=SASL_PLAINTEXT
sasl.mechanism=PLAIN
sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="admin" password="****";

The output of running this is: Created topic sample7.

But, kafka.kafka_proxy.request.create_topics_request: 0 doesn’t change. I was supposed to be 1.

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Comments: 15 (13 by maintainers)

Most upvoted comments