func buildAttrs(ctx context.Context) (processor, subscriber, publisher []attribute.KeyValue) {
	handler := attribute.String("watermill_handler", message.HandlerNameFromCtx(ctx))

	proAttrs := []attribute.KeyValue{handler}
	subAttrs := []attribute.KeyValue{handler, attribute.String("kafka_topic", message.SubscribeTopicFromCtx(ctx))}
	pubAttrs := []attribute.KeyValue{handler, attribute.String("kafka_topic", message.PublishTopicFromCtx(ctx))}

	p, pok := kafka.MessagePartitionFromCtx(ctx)
	if pok {
		subAttrs = append(subAttrs, attribute.Int("kafka_partition", int(p)))
	}

	return proAttrs, subAttrs, pubAttrs
}
// buildAttrs build otel attributes from watermill context data
buildAttrs build otel attributes from watermill context data
// buildAttrs build otel attributes from watermill context data
func buildAttrs(ctx context.Context) (processor, subscriber, publisher []attribute.KeyValue) {
	handler := attribute.String("watermill_handler", message.HandlerNameFromCtx(ctx))
	proAttrs := []attribute.KeyValue{handler}
	subAttrs := []attribute.KeyValue{handler, attribute.String("kafka_topic", message.SubscribeTopicFromCtx(ctx))}
	pubAttrs := []attribute.KeyValue{handler, attribute.String("kafka_topic", message.PublishTopicFromCtx(ctx))}
	p, pok := kafka.MessagePartitionFromCtx(ctx)
	if pok {
		subAttrs = append(subAttrs, attribute.Int("kafka_partition", int(p)))
	}
	return proAttrs, subAttrs, pubAttrs
}
func buildAttrs ( ctx context . Context ) ( processor , subscriber , publisher [ ] attribute . KeyValue ) { handler := attribute . String ( " " , message . HandlerNameFromCtx ( ctx ) ) proAttrs := [ ] attribute . KeyValue { handler } subAttrs := [ ] attribute . KeyValue { handler , attribute . String ( " " , message . SubscribeTopicFromCtx ( ctx ) ) } pubAttrs := [ ] attribute . KeyValue { handler , attribute . String ( " " , message . PublishTopicFromCtx ( ctx ) ) } p , pok := kafka . MessagePartitionFromCtx ( ctx ) if pok { subAttrs = append ( subAttrs , attribute . Int ( " " , int ( p ) ) ) } return proAttrs , subAttrs , pubAttrs }
buildAttrs build otel attributes from watermill context data
buildAttrs build otel attributes from watermill context data