Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Client instance - a single instance of a producer, consumer, Admin client, etc.
  • Application process instance - a single application runtime, which may contain multiple client instances. E.g. a Kafka Streams application with a mix of Admin, producer and consumer instances. This identity is however outside the scope of this proposal.

This proposal suggests that as part of the initial metrics handshake the broker generates a unique client instance id based on the client.id and a UUID4 hex string and returns it to the client. The client must use the returned client instance id for the remaining lifetime of the client instance.

...

As it is not feasible for a Kafka client instance to automatically generate or acquire a unique identity for the application process it runs in, and as we can’t rely on the user to configure one, we treat the application instance id as an optional future nice-to-have that may be included as a metrics label if it has been set by the user. This allows a more direct mapping of client instance to application instance and vice versa. However, due to these constraints, adding an application instance id is outside the scope of this proposal.

Kafka Streams applications have an application.id configured and this identity should be included as the application_id  metrics label.

Mapping

Mapping the client instance id to an actual application instance running on a (virtual) machine can be done by inspecting the metrics resource labels, such as the client source address and source port, or security principal, all of which are added by the receiving broker. This will allow the operator together with the user to identify the actual application instance.

...

Label name

Description

client_software_name

The client’s implementation name.

client_software_version

The client’s version

client_instance_id

The generated CLIENT_INSTANCE_ID.

client_id

client.id

application_idapplication.id  (Kafka Streams only)

client_rack

client.rack (if configured)

group_id

group.id (consumer)

group_instance_id

group.instance.id (consumer)

group_member_id

Group member id (if any, consumer)

transactional_id

transactional.id (producer)

hostname

Hostname of the client machine.

Only emitted if private metrics are enabled.

os

Operating system name, version, architecture, distro, etc.

Only emitted if private metrics are enabled.

runtime

Runtime environment, e.g., the JVM, .NET runtime, Python version, etc.

Only emitted if private metrics are enabled.

...