Skip to content

Conversation

@SomilJain0112
Copy link
Contributor

Which problem is this PR solving?

#7731

Description of the changes

Below are the description of the changes
a. Will use apache/kafka and will remove Bitnami

b. Import Kafka setup from v3/docker-compose.yml as suggested by you.

c. Will remove ZooKeeper and instead use KRaft mode.

How was this change tested?

Through local testing

Checklist

@SomilJain0112 SomilJain0112 requested a review from a team as a code owner December 23, 2025 14:07
@dosubot dosubot bot added docker Pull requests that update Docker code storage/kafka labels Dec 23, 2025
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
# Cluster ID for KRaft
CLUSTER_ID: MkU3OEVBNTcwNTJENDM2Qg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it have to be a weird string, or can we make it readable like test_kafka_cluster_id?

@codecov
Copy link

codecov bot commented Dec 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.51%. Comparing base (daed98e) to head (d5e6fd1).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7762      +/-   ##
==========================================
+ Coverage   95.49%   95.51%   +0.01%     
==========================================
  Files         307      307              
  Lines       15911    15911              
==========================================
+ Hits        15195    15197       +2     
+ Misses        562      561       -1     
+ Partials      154      153       -1     
Flag Coverage Δ
badger_v1 9.18% <ø> (ø)
badger_v2 1.93% <ø> (ø)
cassandra-4.x-v1-manual 13.58% <ø> (ø)
cassandra-4.x-v2-auto 1.92% <ø> (ø)
cassandra-4.x-v2-manual 1.92% <ø> (ø)
cassandra-5.x-v1-manual 13.58% <ø> (ø)
cassandra-5.x-v2-auto 1.92% <ø> (ø)
cassandra-5.x-v2-manual 1.92% <ø> (ø)
clickhouse 1.97% <ø> (ø)
elasticsearch-6.x-v1 17.54% <ø> (ø)
elasticsearch-7.x-v1 17.57% <ø> (ø)
elasticsearch-8.x-v1 17.73% <ø> (ø)
elasticsearch-8.x-v2 1.93% <ø> (ø)
elasticsearch-9.x-v2 1.93% <ø> (ø)
grpc_v1 8.84% <ø> (ø)
grpc_v2 1.93% <ø> (ø)
kafka-3.x-v2 1.93% <ø> (ø)
memory_v2 1.93% <ø> (?)
opensearch-1.x-v1 17.62% <ø> (ø)
opensearch-2.x-v1 17.62% <ø> (ø)
opensearch-2.x-v2 1.93% <ø> (ø)
opensearch-3.x-v2 1.93% <ø> (ø)
query 1.93% <ø> (ø)
tailsampling-processor 0.55% <ø> (ø)
unittests 94.14% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yurishkuro yurishkuro added the changelog:dependencies Update to dependencies label Dec 23, 2025
@SomilJain0112
Copy link
Contributor Author

Hii @yurishkuro , Just went through your comments,
I will make the name as KAFKA_BROKER as its a single broker, CLUSTER_ID is a unique identifier for the Kafka cluster required for KRaft ( already that CLUSTER_ID existed in codebase) and will revert the ports that were for testing.

Any more changes you think needs to be done?

@SomilJain0112
Copy link
Contributor Author

Heyy @yurishkuro , as mentioned earlier CLUSTER_ID has to be a base64 encoded UUID of 22 character, correct me If I am wrong and any other changes are needed or not ? Should I procees further with the discussed changes?

@yurishkuro
Copy link
Member

yurishkuro commented Jan 5, 2026

CLUSTER_ID has to be a base64 encoded UUID of 22 character

what is the proof that it has to be base64 encoded and not just a plain string?

Should I procees further with the discussed changes?

The main issue is the CI workflow for Kafka doesn't pass.

@SomilJain0112 SomilJain0112 force-pushed the fix/replace-bitnami-kafka branch from bf888b2 to c04ad3f Compare January 5, 2026 19:31
@github-actions
Copy link

github-actions bot commented Jan 5, 2026

Metrics Comparison Summary

Total changes across all snapshots: 7

Detailed changes per snapshot

summary_metrics_snapshot_kafka

📊 Metrics Diff Summary

Total Changes: 7

  • 🆕 Added: 0 metrics
  • ❌ Removed: 0 metrics
  • 🔄 Modified: 7 metrics

🔄 Modified Metrics

  • otelcol_kafka_exporter_latency_milliseconds

    • Added variants: 18
    • Removed variants: 18
    View diff sample
    -otelcol_kafka_exporter_latency_milliseconds{le="+Inf",node_id="1",otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter",otel_scope_schema_url="",otel_scope_version="",outcome="success",server_address="localhost"}
    +otelcol_kafka_exporter_latency_milliseconds{le="+Inf",node_id="1",otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter",otel_scope_schema_url="",otel_scope_version="",outcome="success",server_address="127.0.0.1"}
    -otelcol_kafka_exporter_latency_milliseconds{le="0",node_id="1",otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter",otel_scope_schema_url="",otel_scope_version="",outcome="success",server_address="localhost"}
    +otelcol_kafka_exporter_latency_milliseconds{le="0",node_id="1",otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter",otel_scope_schema_url="",otel_scope_version="",outcome="success",server_address="127.0.0.1"}
    -otelcol_kafka_exporter_latency_milliseconds{le="10",node_id="1",otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter",otel_scope_schema_url="",otel_scope_version="",outcome="success",server_address="localhost"}
    +otelcol_kafka_exporter_latency_milliseconds{le="10",node_id="1",otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter",otel_scope_schema_url="",otel_scope_version="",outcome="success",server_address="127.0.0.1"}
    -otelcol_kafka_exporter_latency_milliseconds{le="100",node_id="1",otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter",otel_scope_schema_url="",otel_scope_version="",outcome="success",server_address="localhost"}
    ...
  • otelcol_kafka_broker_connects

    • Added variants: 1
    • Removed variants: 1
    View diff sample
    -otelcol_kafka_broker_connects{node_id="1",otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter",otel_scope_schema_url="",otel_scope_version="",outcome="success",server_address="localhost"}
    +otelcol_kafka_broker_connects{node_id="1",otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter",otel_scope_schema_url="",otel_scope_version="",outcome="success",server_address="127.0.0.1"}
  • otelcol_kafka_exporter_records

    • Added variants: 1
    • Removed variants: 1
    View diff sample
    -otelcol_kafka_exporter_records{compression_codec="none",node_id="1",otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter",otel_scope_schema_url="",otel_scope_version="",outcome="success",partition="0",server_address="localhost",topic="jaeger-spans-"}
    +otelcol_kafka_exporter_records{compression_codec="none",node_id="1",otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter",otel_scope_schema_url="",otel_scope_version="",outcome="success",partition="0",server_address="127.0.0.1",topic="jaeger-spans-"}
  • otelcol_kafka_exporter_messages

    • Added variants: 1
    • Removed variants: 1
    View diff sample
    -otelcol_kafka_exporter_messages{compression_codec="none",node_id="1",otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter",otel_scope_schema_url="",otel_scope_version="",outcome="success",partition="0",server_address="localhost",topic="jaeger-spans-"}
    +otelcol_kafka_exporter_messages{compression_codec="none",node_id="1",otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter",otel_scope_schema_url="",otel_scope_version="",outcome="success",partition="0",server_address="127.0.0.1",topic="jaeger-spans-"}
  • otelcol_kafka_exporter_bytes_uncompressed

    • Added variants: 1
    • Removed variants: 1
    View diff sample
    -otelcol_kafka_exporter_bytes_uncompressed{compression_codec="none",node_id="1",otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter",otel_scope_schema_url="",otel_scope_version="",outcome="success",partition="0",server_address="localhost",topic="jaeger-spans-"}
    +otelcol_kafka_exporter_bytes_uncompressed{compression_codec="none",node_id="1",otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter",otel_scope_schema_url="",otel_scope_version="",outcome="success",partition="0",server_address="127.0.0.1",topic="jaeger-spans-"}
  • otelcol_kafka_exporter_write_latency_seconds

    • Added variants: 22
    • Removed variants: 22
    View diff sample
    -otelcol_kafka_exporter_write_latency_seconds{le="+Inf",node_id="1",otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter",otel_scope_schema_url="",otel_scope_version="",outcome="success",server_address="localhost"}
    +otelcol_kafka_exporter_write_latency_seconds{le="+Inf",node_id="1",otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter",otel_scope_schema_url="",otel_scope_version="",outcome="success",server_address="127.0.0.1"}
    -otelcol_kafka_exporter_write_latency_seconds{le="0",node_id="1",otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter",otel_scope_schema_url="",otel_scope_version="",outcome="success",server_address="localhost"}
    +otelcol_kafka_exporter_write_latency_seconds{le="0",node_id="1",otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter",otel_scope_schema_url="",otel_scope_version="",outcome="success",server_address="127.0.0.1"}
    -otelcol_kafka_exporter_write_latency_seconds{le="0.005",node_id="1",otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter",otel_scope_schema_url="",otel_scope_version="",outcome="success",server_address="localhost"}
    +otelcol_kafka_exporter_write_latency_seconds{le="0.005",node_id="1",otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter",otel_scope_schema_url="",otel_scope_version="",outcome="success",server_address="127.0.0.1"}
    -otelcol_kafka_exporter_write_latency_seconds{le="0.01",node_id="1",otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter",otel_scope_schema_url="",otel_scope_version="",outcome="success",server_address="localhost"}
    ...
  • otelcol_kafka_exporter_bytes

    • Added variants: 1
    • Removed variants: 1
    View diff sample
    -otelcol_kafka_exporter_bytes{compression_codec="none",node_id="1",otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter",otel_scope_schema_url="",otel_scope_version="",outcome="success",partition="0",server_address="localhost",topic="jaeger-spans-"}
    +otelcol_kafka_exporter_bytes{compression_codec="none",node_id="1",otel_scope_name="github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter",otel_scope_schema_url="",otel_scope_version="",outcome="success",partition="0",server_address="127.0.0.1",topic="jaeger-spans-"}

➡️ View full metrics file

- "9094:9094"
- "9095:9095"
volumes:
- ../../../internal/config/tlscfg/testdata:/bitnami/kafka/config/certs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so if we are not mapping certs, do we still need all the functionality in generate_jks_files() in kafka.sh?

@Parship12 what was the intent of introducing those in #7395 ? It seems our Kafka exporter config is pretty vanilla without any authentication

  kafka:
    brokers:
      - ${env:KAFKA_BROKER:-localhost:9092}
    traces:
      topic: ${env:KAFKA_TOPIC:-jaeger-spans}
      encoding: ${env:KAFKA_ENCODING:-otlp_proto}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's correct - those ports were added in #7395 to support testing diff authentication methods. However, after looking at the actual tests, i noticed that:

Current situation is the infrastructure exists (ports 9092, 9093, 9095 with PLAINTEXT, SASL_SSL, SASL_PLAINTEXT), generate_jks_files().

BUT the actual integration tests in kafka_test.go only connect to localhost:9092 (PLAINTEXT), no tests actually use the SASL_SSL (9093) or SASL_PLAINTEXT (9095). (ignoring the usage in this PR #7762)

The code fix from #7395 (supporting TLS with different auth methods) works correctly, but the test infrastructure to verify it was never actually used.

Should I raise a PR to simplify it? (remove unused ports 9093/9095 and generate_jks_files(), JKS/SSL/SASL configuration, certificate volume mounting, so it will be simplified to PLAINTEXT Kafka on port 9092 only).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ports are already being removed / simplified in this PR. I think it's ok for us to not test auth permutations, since we're just using the upstream exporter/receiver.

Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@yurishkuro yurishkuro merged commit fdbb832 into jaegertracing:main Jan 6, 2026
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:dependencies Update to dependencies docker Pull requests that update Docker code storage/kafka

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants