feat kafka

This commit is contained in:
2026-01-24 22:46:15 +08:00
parent b45df9c4ee
commit 81e422d304
4 changed files with 9 additions and 15 deletions

View File

@@ -26,7 +26,7 @@ func (c *Producer) Produce(ctx context.Context, topic, value string) {
func producerError() {
for err := range client.producer.Errors() {
ctx := NewCarrier().ExtractProducer(err.Msg.Headers)
_, span := otel.Tracer(client.serverName).Start(ctx, "kafka.producer")
_, span := otel.Tracer("common.db.kafka").Start(ctx, "kafka.producer.error")
span.SetStatus(otelcodes.Error, err.Error())
span.End()
}