-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[kafkajs]: Instrument Producer #2217
Comments
The library does not provide hook points for serialization:
Given the way the library abstracts the sending of data, we are likely to instrument the |
@jsumners-nr I think that's fine. The span will account for all the internal processing. I'm not sure if our message shim will capture these by default
, they should but hard to tell |
I am saying that we cannot generate those metrics. Which is okay by our spec. It says that we must record them if we are able to. |
Description
We should add instrumentation to support the producing messages based on the docs
Producer
Sending a message with the producer MUST be wrapped in a trace.
Trace duration MUST include time of the following:
Trace duration MAY include time of the following:
In async "sending the message" means adding it to the queue to be sent out later.
In sync "sending the message" means actually sending the message to the consumer.
Trace Name
The trace name MUST be in the following format:
MessageBroker/Kafka/Topic/Produce/Named/{topic_name}
Serialization Metrics
Because serializing and deserializing is such a common thing to do with Kafka, many
implementations include this as an option directly on the producer/consumer or as a
specialized Serializingproducer Deserializingconsumer. It very useful to capture the
time it takes to serialize the producer's message as there may be significant slow downs
due to this type of operation. A message consists of both a key and a value which are
serialized independently. If serialization monitoring is possible, the following metrics
MUST be captured:
Additional Context
kafkajs
.recordProduce
method with the appropriate specThe text was updated successfully, but these errors were encountered: