Skip to content

expose java Kafka producer metrics#641

Closed
dfakhritdinov wants to merge 4 commits intomasterfrom
df/SHRIKE-73-java-kafka-producer-metrics
Closed

expose java Kafka producer metrics#641
dfakhritdinov wants to merge 4 commits intomasterfrom
df/SHRIKE-73-java-kafka-producer-metrics

Conversation

@dfakhritdinov
Copy link
Copy Markdown
Contributor

No description provided.

metrics(clientId)
}
KafkaProducerOf[F](producerMetrics)
val prefix = clientIdOf(config.journal.kafka.consumer.common)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

client ID is already included in the generated labels

Copy link
Copy Markdown
Contributor Author

@dfakhritdinov dfakhritdinov Jul 10, 2024

Choose a reason for hiding this comment

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

in what kind of labels the ID is already included?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please try to run it locally - client_id is already included in the labels generated by the collector.
I suspect if you generate the prefix this way, it won't even mention that those are "kafka producer" metrics.

}
KafkaProducerOf[F](producerMetrics)
val prefix = clientIdOf(config.journal.kafka.consumer.common)
KafkaProducerOf.apply1[F](prefix, producerMetrics)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

there should be a way to disable producer metrics without disabling overall journal metrics

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

why should the metrics be so configurable? I see not much sense in it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If they name clash with other things, it's good to be able to disable them.

@coveralls
Copy link
Copy Markdown

coveralls commented Jul 10, 2024

Pull Request Test Coverage Report for Build 9874635831

Details

  • 12 of 12 (100.0%) changed or added relevant lines in 2 files are covered.
  • 8 unchanged lines in 7 files lost coverage.
  • Overall coverage increased (+0.2%) to 81.29%

Files with Coverage Reduction New Missed Lines %
persistence/src/main/scala/akka/persistence/kafka/journal/KafkaJournal.scala 1 85.85%
core/src/main/scala/com/evolutiongaming/kafka/journal/LogFromAkka.scala 1 28.57%
replicator/src/main/scala/com/evolutiongaming/kafka/journal/replicator/Batch.scala 1 98.18%
core/src/main/scala/com/evolutiongaming/kafka/journal/util/GracefulFiber.scala 1 75.0%
journal/src/main/scala/com/evolutiongaming/kafka/journal/Journals.scala 1 84.17%
snapshot/src/main/scala/com/evolutiongaming/kafka/journal/BufferNr.scala 1 83.33%
replicator/src/main/scala/com/evolutiongaming/kafka/journal/replicator/ReplicateRecords.scala 2 77.19%
Totals Coverage Status
Change from base Build 9804463972: 0.2%
Covered Lines: 3302
Relevant Lines: 4062

💛 - Coveralls

@dfakhritdinov dfakhritdinov self-assigned this Jul 11, 2024
@dfakhritdinov dfakhritdinov requested a review from mr-git July 11, 2024 08:05
@dfakhritdinov dfakhritdinov marked this pull request as draft July 11, 2024 10:34
@dfakhritdinov
Copy link
Copy Markdown
Contributor Author

The PR must be re-implemented after evolution-gaming/skafka#430 will be merged. New skafka feature will allow much smoother integration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants